0

I am facing this error while building/importing my project on IntelliJ 2016.2(64).

Bad version number in .class file

My java home is set to Java 1.5 Update 22 (64 bit). I need to use this version of Java, specifically. Is there a way I can do that ?

  • 2
    Possible duplicate of [java.lang.UnsupportedClassVersionError: Bad version number in .class file?](http://stackoverflow.com/questions/2466828/java-lang-unsupportedclassversionerror-bad-version-number-in-class-file) – Sanjeev Jul 31 '16 at 16:42
  • You need a class which was compiled for Java 5.0 or earlier. I would use the source to recompile it. I would also make sure I have the most up to date update of Java 5.0 given it is such an old version. – Peter Lawrey Jul 31 '16 at 16:42
  • 1
    Point is: normally IntelliJ will be using the java version it is running with for your projects. If you want to build your projects for a different version of java, you have to modify the corresponding entries in your project setup. – GhostCat Jul 31 '16 at 16:43
  • Where exactly do you see that error? – yole Jul 31 '16 at 20:43

0 Answers0