ShirazITCo
ShirazITCo

Reputation: 1041

Run java using custom JRE

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

Answers (3)

Stefan Kendall
Stefan Kendall

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

corsiKa
corsiKa

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

Vicente Plata
Vicente Plata

Reputation: 3380

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

Upvotes: 5

Related Questions