Jump to content
Excelsior Forums
julian_cochran

Installation file sizes with JRE included

Recommended Posts

My Java application is less than 1MB (for the .jar file and resources such as images) and Sun's JRE 1.4 for Windows is about 8MB.

I used the evaluation of JET and the packaging/installation utility that comes with JET to create a single .EXE file that acts as the installation file that is distributed. I was alarmed to see that the file was 32MB. I used all of the default settings in both JET adn the packaging utility

What is producing a file so large? Is that any way to get the file down closer to around 10MB as I would expect?

Apart from this everything went increadible smoothly.

Best Regards

Julian Cochran

Share this post


Link to post
Share on other sites
Sun's JRE 1.4 for Windows is about 8MB

I'm wondered where you've got such small JRE. Standard one is more then 30MB in unpacked state (and about 16MB packed).

Further, usually the application as an EXE is bigger then as class-files. It's inconvinient when distributing, but note that memory consumed by HotSpot JVM to compile it when running the application is even more.

Unfortunately, one can get small distributives only for the applications not using AWT or Swing (standalone executables), when there is no need to redistribute the JRE. This feature is available only in the Professional Edition.

Share this post


Link to post
Share on other sites

>I'm wondered where you've got such small JRE.

>Standard one is more then 30MB in unpacked state

>(and about 16MB packed).

If you click goto java.sun.com and select the "J2SE 1.4 SDK" link to the left  and then select the JRE column under the Windows row, you are taken to the download for the Windows JRE. It shows:

Download j2re-1_4_0_03-windows-i586.exe .

Filesize = 9,395,960 bytes.

So shouldn't JetPack be producing a file not much larger than 10MB? The file produced by Jetpack was over 30MB and it was already compressed. I ran it through WinZip and the resulting ZIP file was still over 30MB.

Why is such a large file being produced? The JRE is NOT as large as 16MB, but even if it was then JetPack should be producing an installataion file not much more than 18MB for a small application not carrying any resources, right?

I'd be happy to buy this product if an installation file could be produced that wasn't so much larger than the JRE.

Best Regards

Julian Cochran

Share this post


Link to post
Share on other sites

OK, the JRE distributive size is really about 9MB. However, during the JRE installation jars are created somehow, not just unpacked. Thus, not packed JRE is about 37MB and zipped JRE is about 14MB.

Then, resulting application distributive also contains JET runtime DLLs (which includes RT itself and pre-compiled JRE classes). The full set of DLLs is about 34MB, but only the really used part is deployed. Depending of application, it can be from 6MB to 34MB (from 2.5MB to 14MB zipped).

Additionally, there is the installer plus your application.

I hope things become more clear?

Share this post


Link to post
Share on other sites

Oh, now I'm getting the picture. We are really distributing not only the whole (Sun's) JRE as a legal requirement (it cannot be distributed in part) but also the JET runtime.

But still something inefficient is going on. My application uses a miniscure amoutn of Swing and the rest of AWT. I can accept the JRE being 14MB in the manner that you are distributing it, but the amount that JET and the DLLs are adding amounts to 20MB for my small application. The resulting installation file is 34MB.

I would rather sacrifice the extra speed that JET offers and have a distribution file that is about 15MB (Sun's original 9MB JRE, a bit extra for the installer and my 1MB application), but I do not know any such products that are well priced.

JET Professional is in my acceptable range. InstallAnywhere and InstallShield are both twice as expensive and definitely out of my budget. Can you advocate any product that offers a seemless installer (for example as excellent as your JetPack installer) but does not do the extra compiling/optimization (i.e. runs the application entirely through the JRE) and produces the much smaller distribution file?

Best Regards

Julian

Share this post


Link to post
Share on other sites

If you can afford JET Pro, you may compile your app into a single EXE using JetPerfect Global Optimizer. The EXE would be larger, but would not require JET run-time DLLs. Refer to the chapter "JetPerfect" in the User's Guide for details.

If you can move from Swing/AWT to SWT, you may get rid of the JRE either. See http://www.excelsior-usa.com/jetswt.html for details.

Otherwise, check out JExePack from Duckware (http://www.duckware.com/jexepack/index.html).

Share this post


Link to post
Share on other sites

×