我有一个我真的很想利用专用JRE而不是要求我的客户下载Java的程序。我正在使用Launch4j作为构建工具,并且一直在尝试使用捆绑的JRE功能。我已将JRE复制到程序的目录中,并设置如下:
//home/user/Program Name:
/cfg (contains Launch 4j xml build file)
/bin (contains signature key, exe, and Jar file)
/Runtime (contains working copy of JRE)
我曾尝试修改xml以直接指向JRE中的Javaw.exe,但这没有什么不同。我还尝试过将以下行添加到其他SO论坛的xml中,但老实说,我不是100%知道它的作用:
<opt>-DgvSIG.confDir=../cfg</opt>
我的问题是,我需要对xml配置进行哪些修改,以便任何远程用户都可以在无需第一次下载Java的情况下打开我的程序。我在Windows上,现在仅在Windows上可以使用。这是我的xml:
<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>console</headerType>
<jar>C:\Users\zrr81\Climate Dev Pegasus\bin\ClimateDevPegasus_Alpha.jar</jar>
<outfile>C:\Users\zrr81\Climate Dev Pegasus\bin\ClimateDevPegasus_Alpha.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>normal</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl></supportUrl>
<stayAlive>false</stayAlive>
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon>C:\Users\zrr81\Climate Dev Pegasus\Pegasus.ico</icon>
<jre>
<path>Climate Dev Pegasus\Runtime\jdk-13.0.1\bin\javaw.exe</path>
<bundledJre64Bit>true</bundledJre64Bit>
<bundledJreAsFallback>false</bundledJreAsFallback>
<minVersion>1.5.0</minVersion>
<maxVersion>13.0.2</maxVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
</jre>
</launch4jConfig>