Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-01-2008, 09:07 AM
Member
 
Join Date: Sep 2008
Location: Kolkata, India
Posts: 20
Rep Power: 0
Md Saim is on a distinguished road
Post How to run jar file without installing jre
i have a stand-alone JAR file. I want it to distribute it on CD.Now JAR file requires JRE to work.How do i create the CD without installing JRE on the client PC ? Is there any way to emulate the Java Runtime Environment on the CD so that no installation of JRE is required on the client PC and the JAR file can directly run from the CD .

Thanks in advance.

Last edited by Md Saim; 10-01-2008 at 09:14 AM.
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 10-01-2008, 12:11 PM
Senior Member
 
Join Date: Sep 2008
Posts: 131
Rep Power: 0
georgemc is on a distinguished road
Default
Can't be done
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 10-01-2008, 03:19 PM
GhosT's Avatar
Member
 
Join Date: Sep 2008
Location: Dhaka, Bangladesh
Posts: 37
Rep Power: 0
GhosT is on a distinguished road
Default
Quote:
Can't be done
not true....i have done it many times...u need a software JAR2EXE converter. It will make your jar file a native one and thn u can run it without having JDK installed.

Other normal exe converters will just make an exe to call the jar. so chk before u download.

EXAMPLE

i made all these in java and converted them in exe...they run fine!

Last edited by GhosT; 10-01-2008 at 03:21 PM.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 10-01-2008, 04:55 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Rep Power: 4
Norm is on a distinguished road
Default
Ghost-
Look at the size of the folders containing the jre. Compare that to the size of the .exe that is created. Do you think that all that code in the jre can be squeezed into the .exe?
Does the jar2exe conversion program convert java code to MS code so that it uses MS's dll files vs the Sun class files?
Are you able to execute the .exe on a system that does NOT contain a jre?

Where did you get your jar2exe program? One that does NOT make an exe to call the jar.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 10-01-2008, 05:45 PM
GhosT's Avatar
Member
 
Join Date: Sep 2008
Location: Dhaka, Bangladesh
Posts: 37
Rep Power: 0
GhosT is on a distinguished road
Default
my jar file had a size of 100KB and when i made it exe it required me to locate all the library jars and the total size has increased to 3+ MB...i sent it to my friends computer...and he said it was running...he dont do java...so i guess...its possible...

but i didnt check it in my pc...because i am afraid if i uninstall JDK some previous problems i had regarding installation will arise again...

the program builder is regexlab.
Jar2Exe - Java2Exe - JarToExe Convert Wizard Free Edition Download
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 10-01-2008, 05:50 PM
GhosT's Avatar
Member
 
Join Date: Sep 2008
Location: Dhaka, Bangladesh
Posts: 37
Rep Power: 0
GhosT is on a distinguished road
Default
um sorry...i guess it needs jvm to run...i had this confusion...sorry...it wont run without jre/jdk installed. it starts java virtual machine using JNI interface.

still making exe makes it easy to distribute through installers.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 10-01-2008, 07:24 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Rep Power: 4
Norm is on a distinguished road
Default
I think you could test it on your PC without doing an uninstall by finding all the java.exe files and renaming them to something like java.exe.XXX so that the .exe can't find a java.exe and see what happened.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 10-01-2008, 08:11 PM
Senior Member
 
Join Date: Sep 2008
Posts: 131
Rep Power: 0
georgemc is on a distinguished road
Default
Now run that once-portable Java application on a Unix machine.....

The question isn't really "how do I do this?" it's "Why bother doing this?"
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 10-02-2008, 05:11 AM
GhosT's Avatar
Member
 
Join Date: Sep 2008
Location: Dhaka, Bangladesh
Posts: 37
Rep Power: 0
GhosT is on a distinguished road
Default
EID MUBARAK to u people!
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing j2s in eclipse3.4 ravjot28 Eclipse 0 07-07-2008 06:51 PM
installing j2s ravjot28 Eclipse 9 06-27-2008 11:10 AM
Installing JMF vinnieza Eclipse 0 05-04-2008 07:11 PM
Need Help installing java - can you help me? Menre New To Java 3 02-04-2008 08:39 AM
Installing Java Adv3nt New To Java 3 12-12-2007 11:29 PM


All times are GMT +2. The time now is 12:14 AM.



VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org