| Author |
Unsupported major.minor version 49.0
|
Eric Goforth
Greenhorn
Joined: Sep 08, 2005
Posts: 2
|
|
Hello, I'm getting this error message when I try to run a SIMPLE java application. Any idea why? My source code is: class VolcanoApplication { public static void main() { // public static void main(String[] arguments) { // // VolcanoRobot dante = new VolcanoRobot(); // dante.status = "exploring"; // dante.speed = 2; // dante.temperature = 510; // dante.showAttributes(); // System.out.println("Increasing speed to 3."); // dante.speed = 3; // dante.showAttributes(); // System.out.println("Changing temperature to 670."); // dante.temperature = 670; // dante.showAttributes(); // System.out.println("Checking the temperature."); // dante.checkTemperature(); // dante.showAttributes(); } } My output is: C:\Documents and Settings\Eric.Goforth\My Documents\MyJavaSrc>java VolcanoApplic ation Exception in thread "main" java.lang.UnsupportedClassVersionError: VolcanoApplic ation (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) -Eric
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24041
|
|
Hi Eric, Welcome to JavaRanch! It looks like you've got more than one Java version installed. You're compiling with JDK 1.5 (version 49.0) and running with something earlier. Check your PATH, and also look for a stray copy of java.exe in your Windows folder.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Eric Goforth
Greenhorn
Joined: Sep 08, 2005
Posts: 2
|
|
I've got java.exe's all over the place. I found the whereis command at http://blogs.msdn.com/oldnewthing/archive/2005/01/20/357225.aspx and used it to find out that I was using the one in my c:\windows\system32 directory. I renamed it to java.xxx, hopefully this won't hurt anything. My code now runs. -Eric
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Unsupported major.minor version 49.0
|
|
|