tags:

views:

68

answers:

1

like i said ,this question is about redistributing JRE.

i wrote a swing app to access Google Docs Service,which named iGoSyncDocs and could be found at http://igosyncdocs.sourceforge.net/. if you're interested in,please try it and send me bugs. thanks ahead.

If it is right to bundle JRE with App.

i should make an installer for all operation system,i think. so i tried a lot. like install4j,exe4j,izpack,and some other stuff,which are free. they're so great that i really liked them,but with the bundle jre function,i'm stucked. the whole jre is almost 100M ,that makes it's difficult to deploy on clients. and,jre itself has a version of 32bit and 64bit,how could i do that? different version into one?

If i really have to decrease rt.jar

app based on java will use this rt.jar , do i should find out what classes i used,and put them into another customised rt.jar ? my most concerns is ,is this legal to customise rt.jar and deploy on clients?

if it is wrong to bundle JRE with app

so,if this is a wrong thought, please tell me anything you did to point me out. how could i make app really cool and steady.

+2  A: 

It is legal with OpenJDK as long as you make sources available.

It is not advisable because you want to keep JRE up to date, and having each program using its own JRE is bad, just bad.

It's a problem only with windows, because AFAIK MacOSX comes with a built-in java, and *nix users prefer installing programs from repositories, they'd hate your bundled jre even if it's very small.

So I'd advise you to distribute your program as is, just the jar. For windows users you can make a batch file / small installer that checks for java and shows some message with a link to Oracle download site.

EDIT One more note, jdk comes with a pack200 utility which packs jar files, it can pack rt.jar from 55M to 6.5M. So for windows you can make a small script that packs/unpacks all the jars from the jre to minimize your distribution size.

tulskiy
thanks for replying. so you mean i only have to provide installer on Window? that sounds really comfortable. what is the version of jre on Mac,and it has a up-to-date version? maybe it's better to provide a cross-platform installer or something?
Barry Wei
@Barry Wei: I think osx 10.5 comes with java 1.5, and new versions should have 1.6, but you'd better check it. Your cross-platform installers can be batch files for windows and bash scripts for *nix, including mac.
tulskiy