The Java2 1.5 Runtime on my Windows laptop is close to 60 megs in size.
I'd like to distribute the 1.5 J2RE with my app, but I won't need most of
the extra baggage that gets installed when the RE is installed.
Is there any way (from a legal/licensing standpoint as well as a technical
standpoint) to strip the RE down? The impression I got from reading the
licensing agreement is "no," which is a stupid move on the part of Sun, but
maybe I'm wrong.

Signature
Steve Sobol, Professional Geek 888-480-4638 PGP: 0xE3AE35ED
Company website: http://JustThe.net/
Personal blog, resume, portfolio: http://SteveSobol.com/
E: sjsobol@JustThe.net Snail: 22674 Motnocab Road, Apple Valley, CA 92307
>Is there any way (from a legal/licensing standpoint as well as a technical
>standpoint) to strip the RE down? The impression I got from reading the
>licensing agreement is "no," which is a stupid move on the part of Sun, but
>maybe I'm wrong.
Apparently not. Sun's view is they don't want half baked JREs floating
around screwing up other applications. They won't even let the Jet
people distribute a natively compiled JRE.
I can see five ways around the problem:
1. flooding the Universe with CDs containing the JRE.
2. Getting MS and other OS makers to bundle the JRE and keep it up to
date automatically with auto updates.
3. invent an efficient way to update the JRE without having to send
every byte all over. what you really want to send is the delta of the
obfuscated source, or something logically equivalent.
This of the program as a parse tree. Send the changes to the tree, not
the changes to the class files considered as a text file.
see http://mindprod.com/projects/deltacreator.html
http://mindprod.com/projects/bulkfiledistributor.html
4. Sun get aggressive about keeping its JREs up to date. They
automatically update themselves in the dead of night unless
bludgeoned.
5. A standard installer that sniffs around for a JRE. If it can't find
one it downloads one from Sun and installs it. This way you need not
bundle a JRE with your program, unless you are distributing on CD.
It is nuts for every app to independently solve this general problem
or try to get novice users to handle it manually. The last time I
looked, even the professional installer InstallAnywhere was not bright
enough to do that. You had to decide to either include or exclude the
JRE. If you included it, it got installed even if there was a more
recent one already installed.
Steve Sobol - 17 Aug 2005 06:44 GMT
> Apparently not. Sun's view is they don't want half baked JREs floating
> around screwing up other applications. They won't even let the Jet
> people distribute a natively compiled JRE.
Well, if they're going to be morons about it, I can get a good price on
Visual Studio .NET. The app I want to do is a Windows-only app.
> 5. A standard installer that sniffs around for a JRE. If it can't find
> one it downloads one from Sun and installs it.
58 megs is way too much to download, IMHO.
Perhaps I should bundle one of the other JVMs?
I mean, seriously... 58MB *on top of the download for my app* is sheer idiocy.
Sun tends to have their heads up their a.ses about certain things. This is
definitely one of them.

Signature
Steve Sobol, Professional Geek 888-480-4638 PGP: 0xE3AE35ED
Company website: http://JustThe.net/
Personal blog, resume, portfolio: http://SteveSobol.com/
E: sjsobol@JustThe.net Snail: 22674 Motnocab Road, Apple Valley, CA 92307
chenjian1227@gmail.com - 17 Aug 2005 06:49 GMT
Steve Sobol - 17 Aug 2005 06:46 GMT
> Apparently not. Sun's view is they don't want half baked JREs floating
> around screwing up other applications. They won't even let the Jet
> people distribute a natively compiled JRE.
Hm. Maybe I'm overstating the problem. The 1.5 JVM *is* only 15MB when
downloaded off Sun's web site.
OK, never mind.

Signature
Steve Sobol, Professional Geek 888-480-4638 PGP: 0xE3AE35ED
Company website: http://JustThe.net/
Personal blog, resume, portfolio: http://SteveSobol.com/
E: sjsobol@JustThe.net Snail: 22674 Motnocab Road, Apple Valley, CA 92307
Roedy Green - 18 Aug 2005 07:52 GMT
>Hm. Maybe I'm overstating the problem. The 1.5 JVM *is* only 15MB when
>downloaded off Sun's web site.
I think Sun hopes Java will come to be considered like the OS. It may
be fat, but at least it is shared by all apps and you only need to get
it once.
Thomas Hawtin - 17 Aug 2005 07:00 GMT
> 4. Sun get aggressive about keeping its JREs up to date. They
> automatically update themselves in the dead of night unless
> bludgeoned.
Apparently the Windows on-line installation does update itself with
deltas. Doubt it does it at the dead night though.
And also apparently, the Windows on-line install download downloads less
than eight megs, unless you need extras, such as non-American support.
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/
ldv@mail.com - 17 Aug 2005 07:23 GMT
> >Is there any way (from a legal/licensing standpoint as well as a technical
> >standpoint) to strip the RE down? The impression I got from reading the
[quoted text clipped - 4 lines]
> around screwing up other applications. They won't even let the Jet
> people distribute a natively compiled JRE.
This is not perfectly correct. AFAIK, the next version of Excelsior JET
will include a fully licensed, natively compiled JRE and your natively
compiled Swing apps will no longer need a Sun JRE so run.
Subsetting that precompiled JRE will not be possible, though. What I
think Excelsior could do is provide you with an option to distribute
the Java API classes that you think are not required or seldom required
by your app in pack200 format, and unpack them on demand.
LDV
> Is there any way (from a legal/licensing standpoint as well as a
> technical standpoint) to strip the RE down? The impression I got from
> reading the licensing agreement is "no," which is a stupid move on the
> part of Sun, but maybe I'm wrong.
The file jre/README contains a list of the files which Sun requires in a
re-distribution, and also a (small) list of files which you are allowed
to omit.
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/