Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

How to make a Java program independent of JRE

Thread view: 
pek - 06 Jul 2006 03:02 GMT
Is there a way to create a java application that can run even if there
is no JRE (or JDK) installed on a computer.
Something like a way to create a folder that contains all the required
files the application needs to run.
I want to know if there is a way to create a portable USB stick
application that can run on any computer even if it has or hasn't got a
JRE.

thanks
-pek
IchBin - 06 Jul 2006 04:11 GMT
> Is there a way to create a java application that can run even if there
> is no JRE (or JDK) installed on a computer.
[quoted text clipped - 6 lines]
> thanks
> -pek

No way I know of..

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA              http://weconsultants.phpnet.us
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor,  Regular Guy (1952-)
Danno - 06 Jul 2006 05:17 GMT
> Is there a way to create a java application that can run even if there
> is no JRE (or JDK) installed on a computer.
[quoted text clipped - 6 lines]
> thanks
> -pek

You can't put the jre AND your app on a stick?
That's the way limewire, and many other java apps work.
jonasforssell@yahoo.se - 06 Jul 2006 07:00 GMT
You can compile to native code using GCJ

http://gcc.gnu.org/java/

/Jonas

pek skrev:

> Is there a way to create a java application that can run even if there
> is no JRE (or JDK) installed on a computer.
[quoted text clipped - 6 lines]
> thanks
> -pek
ahjiang@gmail.com - 06 Jul 2006 07:06 GMT
i'm quite curious too..

is it possible to bundle the jre into a folder..then write a bat file
and user just double click and it would call the jre to run the java
pgm?

jonasforss...@yahoo.se wrote:
> You can compile to native code using GCJ
>
[quoted text clipped - 14 lines]
> > thanks
> > -pek
Indraneel - 06 Jul 2006 07:14 GMT
At work, we used to ship some code in a CD that packed in its own jre.
We provided a perl script that you could run which would look for the
jre in the CD, if everything else failed and run our code.

I dont have the data on how much space it took up, but a quick look
into my jdk 1.5 directory on my windows machine shows that the whole
jdk directory is 118 MB

I would assume that a 128 MB pen drive would see you through in this
case!
Thanks
-Indraneel

ahji...@gmail.com wrote:
> i'm quite curious too..
>
> is it possible to bundle the jre into a folder..then write a bat file
> and user just double click and it would call the jre to run the java
> pgm?
Steve W. Jackson - 06 Jul 2006 17:00 GMT
> At work, we used to ship some code in a CD that packed in its own jre.
> We provided a perl script that you could run which would look for the
[quoted text clipped - 15 lines]
> > and user just double click and it would call the jre to run the java
> > pgm?

I maintain an application that has long bundled its own JRE when
shipped.  Our most recent release bundled 1.4.2_08, and the entire "jre"
directory in our Windows version is a little over 41 MB.  Our next
release will use 1.5.x when it comes time to ship it, but I don't yet
know the size.

We make our installers with InstallAnywhere, and they offer "VM packs"
for download that can be bundled with the installer.  I looked through a
couple of these some time ago, and they're just the essentials of a JRE.  
The same could certainly be done by other means.  Sun's license allows
redistribution of a JRE, and dropping one in place like this is an
effective means of ensuring that one is accessible to an application and
won't be affected by any user's decision to uninstall their own or
change versions.

= Steve =
Signature

Steve W. Jackson
Montgomery, Alabama



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.