Well, just bundle everything under $JAVA_HOME/jre
into your distribution (presumably a Zip
/TAR
file) and then have your scripts reference that (i.e. use the java
executable under $JRE_HOME/bin
to run your java program).
Remember that if you do this, you will have to deliver different distributions for different target platforms (Windows,OSX, linux etc) and architectures (or one bloated uber-distribution of course, but no one will thank you for that!).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…