Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

UnsupportedClassVersionError

 
Ranch Hand
Posts: 4716
9
Scala Java
  • 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?
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • 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: 4716
9
Scala Java
  • 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.
 
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic