Java Application packaged with its own JRE
807591Dec 7 2007 — edited Apr 4 2008Hello, I'm currently developing a file-generating application (in Swing). On completion it will be distributed to clients
via cd, unfortunately Web Start is not an option. I would like to package the application with its own JRE. From
my understanding if I do this it should behave as a self-contained application, which is what I'm trying to accomplish.
For instance, when I downloaded JDeveloper I simply unzipped the folder and executed the proper .exe file and
the application launched, there wasn't an actual 'install' procedure.
As a simple example just to get started I would like to create a Hello World type application and package it with
its own JRE then send it to another computer to see if in fact it is self reliant. After reading a few similar posts
this is what I've come up with, please add any insight or correct me if I'm wrong (which is very possible !).
Step 1: Create project and package up into a .jar file
Step 2: Package the .jar file along with the JRE making sure the classpaths are set accordingly.
Step 3: (In Windows) write a batch file that executes the runtime environment along with the .jar for my project.
Questions:
1) Is this even remotely correct ?
2) If I wanted to use this program on a Mac, what type of file would I create to replace the .bat file ?
3) How big is the JRE ? After looking in my Netbeans directories the jre folder was 115MB, but if I go to the
following site: http://www.java.com/en/download/manual.jsp the sizes range from 7.1 - 13.52 MB.
4) Humour me please, what's the difference between the Online and Offline JRE (stupid question I'm sure) ?