After searching all over the web, I am not able to solve my problem of Java execution. When using command prompt to run my "first" Java program, I am faced with the errors of Unsupported class version
and Main class not found. Program will exit
.
I have 2 versions of Java on my PC, Java 6 and 7. I have set the path of the JDK 7 in path environment variables and classpath too. I know the problem: I have javac -version
as 1.7.02 and java version
as 1.6.02, but how to change it and fix the problem?
Please elaborate the problem in easy and understandable language!