How to make Java application standalone?

后端 未结 6 825
长发绾君心
长发绾君心 2021-02-06 11:26

I have to burn a Java application on a CD. This application have to run on every Windows PC wihtout any installation (also JRE shouldn\'t be installed) before.

相关标签:
6条回答
  • 2021-02-06 11:38

    Here's one way... Bundle Java (the JRE) and Launch a Java App with 7zip SFX! ... (Convert Java Apps to an Executable, sort of)

    0 讨论(0)
  • 2021-02-06 11:43

    JSmooth can do the trick with bundling JRE or prompting install Java, and it is free. You can also set properties for JVM

    0 讨论(0)
  • 2021-02-06 11:50

    The easiest way would be to include an unpacked Java installation on the CD and use it to run the application.

    There are AFAIK only 2 "Java to exe" compilers still on the market, one of which (Excelsior JET) is quite expensive, and the other (GCJ) doesn't work on Programs that use AWT or Swing.

    0 讨论(0)
  • 2021-02-06 11:55

    I guess you could copy the JRE from your programs folder onto the CD too. Then, add a batch script to use your "local" JRE to start your app. That should be enough, but I don't know if this works with all versions of windows.

    0 讨论(0)
  • 2021-02-06 11:58

    You'd have to bundle jre on disk and create startup scripts. If you are not satisfied with simple batch / shell startup scripts you can use something like JLauncher to create "real" executable.

    0 讨论(0)
  • 2021-02-06 12:00

    Just burn a jre onto the cd as well and start your application inside a batch script, which sets the CLASSPATH and the JAVA_HOME variables pointing to your jre.

    0 讨论(0)
提交回复
热议问题