Include JRE in my Jar for Swing app [duplicate]

瘦欲@ 提交于 2019-12-22 11:42:11

问题


Possible Duplicate:
How to deliver my Java application with a particular JRE?

I have developed Java desktop application in Swing and created jar for that. This is working fine by double click on it, in my OS (Windows). Now I want to run same jar file in some other system (Different Operating system), that don't have any Java related software.

How to include JRE in my Java application that will make my application to run in any operating system?


回答1:


Include JRE by in my Jar

Don't do that. It is not only quirky and difficult, but would require at least 3 JREs in every application Jar (one each for Windows, OS X & *nix). That is a huge chunk of wasted download for people who only ever need one JRE.

Instead:

  1. Check the user has a suitable JRE using deployJava.js.
  2. Launch the app. using Java Web Start.


来源:https://stackoverflow.com/questions/13872993/include-jre-in-my-jar-for-swing-app

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