• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UnsupportedClassVersionError

 
Chris Staten
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 7749
61
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dave Cryder
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic