• Register
search
Log In
0 votes
70 views

Problem :

I am getting this error when I include an opensource library that I had to compile from source.
java lang unsupportedclassversionerror bad version number in class file
6.9k points

1 Answer

0 votes

Solution :

The reason behind you are getting this message is one of your projects is compiling 1.6 classes. It wont matter if you only have a 1.5 JRE on the system, because Eclipse has its own compiler and only needs a 1.5 JRE to compile 1.6 classes.

Follow bellow steps to resolve the issue:

Check the Project Properties>Java Compiler section

enter image description here

Further Readings:

https://www.eclipse.org/forums/index.php/t/1067175/

36.1k points
edited by

Related questions

2 votes
1 answer 16 views
16 views
Problem: I Create Loan.java and compile it with JDK 1.6 and Run Loan.class with JRE 1.5. C:\Program Files\Java\jre1.5.0_06\bin>java -version java version "1.5.0_06" its shows error like bellow C:\Program Files\Java\jre1.5.0_06\bin ... Unknown Source)         at java.net.URLClassLoader.defineClass(Unknown Source)         at java.net.URLClassLoader.access$100(Unknown Source) what should i do next ..
asked Mar 24 LizzyM 5.7k points
1 vote
1 answer 8 views
8 views
Problem: I Created a Loan.java and compile it with JDK 1.6 and Run Loan.class with JRE 1.5. C:\Program Files\Java\jre1.5.0_06\bin>java -version java version "1.5.0_06" The following thing gives an error message: C:\Program Files\Java ... Source)         at java.net.URLClassLoader.defineClass(Unknown Source)         at java.net.URLClassLoader.access$100(Unknown Source) what should i do next ..
asked Mar 27 LizzyM 5.7k points
0 votes
1 answer 162 views
162 views
Problem : I am getting bellow error while I'm trying to use visual studio code for Java. this version of the java runtime only recognizes class file versions up to 52.0
asked Oct 19, 2019 peterlaw 6.9k points
1 vote
1 answer 6 views
6 views
Problem: Hello Kodlogers, I have started learning Java programming recently. I am solving problems from many websites and even textbooks. Right now I got a problem that says to get numbers of lines in a file using java program. I don’t know how to solve this ... . So, it would be better if you can solve the problem and attach the code for my better understanding. Thanks for your concern.
asked Apr 7 Gavin 14.9k points
3 votes
1 answer 202 views
202 views
Problem: Hello Kodlogs, I am a novice Java programmer. I just wrote my very first program a few minutes earlier. Now I want to write a program that can add two different integer numbers for me. I guess I done my coding well but it says something wrong with my writing and throws back an error: &ldquo ... []args){ int x = 10; int y = 15; int sum = x+y; System.out.println("Sum is: " + sum); } }
asked Mar 23 Gavin 14.9k points