This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Unsupported major.minor version 49.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Unsupported major.minor version 49.0" Watch "Unsupported major.minor version 49.0" New topic

Unsupported major.minor version 49.0

Eric Goforth

Joined: Sep 08, 2005
Posts: 2

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
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 Source)
at Source)
at$100(Unknown Source)
at$ Source)
at Method)
at 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)

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195

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

Joined: Sep 08, 2005
Posts: 2
I've got java.exe's all over the place. I found the whereis command at and used it to find out that I was using the one in my c:\windows\system32 directory. I renamed it to, hopefully this won't hurt anything. My code now runs.

I agree. Here's the link:
subject: Unsupported major.minor version 49.0
jQuery in Action, 3rd edition