I want to be able to distribute by executable JAR without having to make the user upgrade to the latest version of the JRE. How can I package a JRE into the JAR so that they can run the jar with no JRE installed on their system?
Put Java Portable in a sub-directory and launch your jar using a batch/bash script or Launch4j.
来源:https://stackoverflow.com/questions/664858/how-can-you-package-an-executable-jar-with-a-portable-jre