Reputation: 1041
im trying 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
Upvotes: 1
Views: 3922
Reputation: 67822
Is the bat in the same directory as the JRE distribution folder?
Have you tried ./myjre/bin/java.exe -jar myjar.jar
?
Upvotes: -3
Reputation: 82579
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
Upvotes: 3
Reputation: 3380
[PATH_TO_YOUR_JRE]\java[.exe|.bat] [OPTIONS] [CLASS] [ARGUMENTS]
Upvotes: 5