File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes UnsupportedClassVersionError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "UnsupportedClassVersionError" Watch "UnsupportedClassVersionError" New topic


Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4351

i have an applet i created in 2000. it works but im changing it. to start all i did was add one line setBackground(; 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?

Visit my download page
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10825

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

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4351

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.
I agree. Here's the link:
subject: UnsupportedClassVersionError
It's not a secret anymore!