So I have the latest version of JRE 7 on my computer, and everything is working fine. Lately, I've downloaded a program that requires JRE 6. I know where all of the files are located on my computer, all I'm asking is the .bat file code to run a specific version of Java with only that program. I am somewhat of a newbie when it comes to Windows and Java PATH structure, so
Stanford's computer science course has you use a modified version of Eclipse to code in Java, and it was created when Java was still in version 6. If you are familiar with this, then you may know of karel the robot, a Java application that opens in Eclipse. When I tried to run this, the Karel program did not appear; only a blank screen. I found a youtube video about using Karel and many of the people in the comments had been having this problem, and some said that using JRE 6 fixed it. Also on the installation instructions, it said to use JRE 1.6, but I thought it would work with JRE 7
you can call each java.exe directly.
You can create 2 batch file named java6.bat and java7.bat :
java6.bat
@echo off
"C:\Program Files\Java\jre6\bin\java.exe" %*
java7.bat
@echo off
"C:\Program Files\Java\jre7\bin\java.exe" %*
to call a program with jre6
java6 -jar helloworld.jar
and to call a program with jre7
java7 -jar helloworld.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With