开发者

Run java using custom JRE

im tryin开发者_C百科g to run my jar file using a .bat file with a custom bundled jre.

i dont know what should i write to bat file.


i found best solution:

cd path\to\jre\bin

java.exe -jar path-to-jar


[PATH_TO_YOUR_JRE]\java[.exe|.bat] [OPTIONS] [CLASS] [ARGUMENTS]


just qualify your version of java's path

normally you'd write

java -jar myjar.jar

here you'd write

c:\mybundle\bin\java -jar myjar.jar


Is the bat in the same directory as the JRE distribution folder?

Have you tried ./myjre/bin/java.exe -jar myjar.jar?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜