Results 1 to 11 of 11
  1. #1
    Md Saim is offline Member
    Join Date
    Sep 2008
    Location
    Kolkata, India
    Posts
    20
    Rep Power
    0

    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.

  2. #2
    georgemc is offline Senior Member
    Join Date
    Sep 2008
    Posts
    135
    Rep Power
    0

    Default

    Can't be done

  3. #3
    GhosT's Avatar
    GhosT is offline Member
    Join Date
    Sep 2008
    Location
    Dhaka, Bangladesh
    Posts
    37
    Rep Power
    0

    Default

    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.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    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.

  5. #5
    GhosT's Avatar
    GhosT is offline Member
    Join Date
    Sep 2008
    Location
    Dhaka, Bangladesh
    Posts
    37
    Rep Power
    0

    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

  6. #6
    GhosT's Avatar
    GhosT is offline Member
    Join Date
    Sep 2008
    Location
    Dhaka, Bangladesh
    Posts
    37
    Rep Power
    0

    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.

  7. #7
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    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.

  8. #8
    georgemc is offline Senior Member
    Join Date
    Sep 2008
    Posts
    135
    Rep Power
    0

    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?"

  9. #9
    GhosT's Avatar
    GhosT is offline Member
    Join Date
    Sep 2008
    Location
    Dhaka, Bangladesh
    Posts
    37
    Rep Power
    0

    Default

    EID MUBARAK to u people!

  10. #10
    Jhovarie is offline Banned
    Join Date
    Feb 2011
    Posts
    65
    Rep Power
    0

    Default

    Hello guys i think this is helpful i already try this and it work..
    read
    this Bundle Java (the JRE) and Launch a Java App with 7zip SFX! ... (Convert Java Apps to an Executable, sort of) - Mark S. Kolich
    then try it uninstall your jdk and jre in your own computer it works because i already tested it.

  11. #11
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,304
    Rep Power
    20

    Default

    That's not all that different from the 3 year old solution at #5 in the thread. Please don't resurrect dead threads.

    Locking.

    db

Similar Threads

  1. Need Help installing java - can you help me?
    By Menre in forum New To Java
    Replies: 4
    Last Post: 02-22-2010, 12:33 PM
  2. Installing j2s in eclipse3.4
    By ravjot28 in forum Eclipse
    Replies: 0
    Last Post: 07-07-2008, 06:51 PM
  3. installing j2s
    By ravjot28 in forum Eclipse
    Replies: 9
    Last Post: 06-27-2008, 11:10 AM
  4. Installing JMF
    By vinnieza in forum Eclipse
    Replies: 0
    Last Post: 05-04-2008, 07:11 PM
  5. Installing Java
    By Adv3nt in forum New To Java
    Replies: 3
    Last Post: 12-12-2007, 11:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •