How to deliver my Java application with a particular JRE?

前端 未结 9 1356
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 14:31

Does somebody know how to pack a particular JRE together with a compiled Java application? I currently have an executable jar file and wish to put JRE 6 Update 31 in it. So

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 15:02

    A rather new solution, provided by Oracle, is here:

    Self contained packaging

    It reads:

    Self-contained application packages provide the following benefits:

    • Users install the application with an installer that is familiar to them and launch it in the usual way.

    • You control the version of the JRE used by the application.

    • Applications can be deployed on fresh systems with no requirement for the JRE to be installed.

    But a drawback of this approach is:

    Self-contained application packages can only be built using JDK 7 Update 6 or later.

提交回复
热议问题