I have a POS that has to be run on java7 and I checked the current version by typing java -version
on the command prompt and got the following output:
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
Since I want java7, I thought of editing the environment variables to point to jdk1.7 and when I checked the variables, it was as follows:
I see that it is already pointing to java7 jdk. How is this possible and how to run java7?
UPDATE:
I think I figured out the problem but not the solution. The first system variable - C:\ProgramData\Oracle\Java\javapath
is causing the trouble here, which has a java.exe
in the given path. It might be a product of me directly upgrading java from java7 to java8. But if I remove it, it causes an error in cmd. What could be done?