File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java 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 » Beginning Java
Bookmark "UnsupportedClassVersionError" Watch "UnsupportedClassVersionError" New topic
Author

UnsupportedClassVersionError

Chris Staten
Ranch Hand

Joined: Sep 24, 2004
Posts: 101
Hey all, I'm getting the following error when trying to run ANYTING on my windows box:


Is my PATH variable set wrong or something? I checked it and I think it's fine.

I have j2se1.4.2, j2se5.0, and j2ee1.4 installed, if I type "java -version" in the command line I get the following:
java version "1.3.1_01"

-thanks
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

Apparently, you also have Java 1.3.1_01 installed. Try changing your path so that one of the other versions are found first. Your last resort would be to delete all your class files and recompile


Junilu - [How to Ask Questions] [How to Answer Questions]
Dave Cryder
Greenhorn

Joined: Aug 11, 2004
Posts: 9
You are compiling with a version of the compiler that is newer than the version of your JVM. At least, I think that's what it is.
Chris Staten
Ranch Hand

Joined: Sep 24, 2004
Posts: 101
my JAVA_HOME variable is set to jdk1.5.0, am I wrong in thinking that would mean I'm running the newest version of the jre?
Dave Cryder
Greenhorn

Joined: Aug 11, 2004
Posts: 9
The version information that "java -version" spat out indicates that the Java Virtual Machine you are running is older than the version of the compiler you are using. That's a little like trying to get a 5 1/4" floppy into a 3 1/2" drive. The JVM knows that it doesn't have all the facilities for running your byte code (or maybe it tried and died? ), so it's bailing out on you.
Chris Staten
Ranch Hand

Joined: Sep 24, 2004
Posts: 101
gotcha, but how do I change my jre? I just downloaded 1.4.2_06 and installed it. But guess what I get when I check the version? Yup, 1.3.

What am I doing wrong?

Also, I have other software on my computer that my be playing into this.

Oracle 8
DB2
WebSphere app developer 5.2.1


--------Start of Edit-------
I just looked at DB2 to see the version (version 8 BTW) and I noticed that it seems to be using 1.3.1 for it's version of Java.
[ November 24, 2004: Message edited by: Chris Staten ]
Chris Staten
Ranch Hand

Joined: Sep 24, 2004
Posts: 101
Got it!

I was looking at my environment variables just now - in between sessions of running into a brick wall at full speed to alleviate some of my pain - when I noticed something. My user PATH variable was pointing to the right directory, but my system PATH variable was pointing to an oracle directory BEFORE it was pointing to my jdk1.5 directory.

I switched that up and all should be fine now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UnsupportedClassVersionError