• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UnsupportedClassVersionError

 
Randall Twede
Ranch Hand
Posts: 4482
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have an applet i created in 2000. it works but im changing it. to start all i did was add one line setBackground(Color.green); because the new default is white not gray. i compiled it and jarred the class files but now i get an error

java.lang.UnsupportedClassVersionError: Farm : Unsupported major.minor version 51.0

what is going on?
 
Maneesh Godbole
Saloon Keeper
Posts: 11196
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error usually indicates that the jdk version which you are using to compile is higher than the jdk/jre version which you are using to run .
e.g. Compile with 1.6 and run with 1.5

 
Randall Twede
Ranch Hand
Posts: 4482
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks maneesh. that is probably the case. when i run apps from the command line it works fine but evidently the browser is using the older version.

hmmm. not sure what to do here. i do have 2 versions of the jre. the only one that shows up in add/remove programs is java6 update20. i also have java7EE which has the newer jre. i had to set the PATH when i first installed it. firefox is my default browser.

hmmm. apparently i can run it in eclipse if i can figure out how.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic