Other developer had pushed the code and we are building it on a build machine. I was getting Unsupported Major.minor version 52 error.
Is there any way to find the version of JDK used while developing the Java file.
Could some one please help
Other developer had pushed the code and we are building it on a build machine. I was getting Unsupported Major.minor version 52 error.
Is there any way to find the version of JDK used while developing the Java file.
Could some one please help
By developing
you probably mean compiling
the java file.
Take the .class
file and look inside it with javap
:
javap -c -verbose ConstructorReference.class
Output (at the beginning of the output)
public class org.ConstructorReference
minor version: 0
major version: 53
53 - means java 9
52 - means java 8
You get the error because the build machine is using most probably jdk-7 and your class files were compiled with jdk-8 (evidence of 52).