This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unsupported major.minor  RSS feed

 
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have compiled a Java application but whenever i try to execute it i keep getting this error


"The java class could not be loaded. java.lang.UnsupportedClassVersionError:"
 
author and iconoclast
Sheriff
Posts: 24218
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're trying to run the program with an older JVM than the compiler you've used to compile it; for example, the Java 5 compiler and a JDK 1.4 JVM. This often happens on Windows when you install a JDK in the normal place, but some previous installation has installed an extra copy of java.exe inside C:\WINDOWS or some other place it doesn't belong. Either find and delete these extra copies, or modify your PATH to make sure your JDK installation comes first.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!