How to make Java application standalone?

谁说我不能喝 提交于 2019-12-03 03:29:29

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.

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.

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

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!