I've been attempting to compile a small java file via javac but have been getting an error 'class file has wrong version 52.0, should be 49.0'
Upon looking this error up, i've found out that this is occuring because I have a different version of Java and a different version of the compiler.
I'm not entirely well-versed on the difference here but I have the following version of Java on my machine:
Java 7u77
Java 8u65
Java 8u66
Java SE Development Kit 8 Update 66
Java 6 Update 38
Java SE Development Kit 6 Update 38
To me, It looks ot me like I have a same version of Java and SDK(8u66) but am not sure why it's causing the failures.
Doing a -version in cmd, I am seeing a similar version:
c:\ServletDevel>java -version
java version "1.5.0_30"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_30-b03)
Java HotSpot(TM) Client VM (build 1.5.0_30-b03, mixed mode)
c:\ServletDevel>javac -version
javac 1.5.0_30
javac: no source files
Usage: javac <options> <source files>
Is there a chance that I'm using an old version of SDK? Or an older version of Java? The plan is to use the Java 8u66 version