Unsupported major.minor version 49.0

My System configuration is
-Mac OS X 10.4.5 PowerPC
-JBuilder 2005 Foundation
-J2SE5.0 Release 3

Have a Java based application I developed using JBuilder 2005 with JDK
5.0 and it runs very well through JBuilder.

I am in process of making jar of the same application, After building
the jar, when I try to run it using "java -jar RDH.jar" gives
following exception
Exception in thread "main" java.lang.UnsupportedClassVersionError:
RDHProject/RDH (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
I have reinstalled the J2SE 2.0 but still the problem persists.
Upon some research, I tried to find version of java on my m/c using
"java -version" showed following

"java -version
java version "1.4.2_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-232)
Java HotSpot(TM) Client VM (build 1.4.2-54, mixed mode)

I suppose the jdk settings are still the older that, and his is why I
am getting problem. I have used functionalty of JDK 1.5 thats why I
have used latest version for compiling my app.

So how to resolve this issue ? I hope many people over this group have
faced similiar kind of problem. Do we need to change the profile
settings in etc ??

Please suggest.

Who is Participating?
objectsConnect With a Mentor Commented:
either use 1.5 to run it
or compile it wiuth option -target 1.4
rohitdivasAuthor Commented:
how to use 1.5 to run it ? Can you write down the whole command ?
for Mac OS
you need to know where it is installed
Giant2Connect With a Mentor Commented:
>Have a Java based application I developed using JBuilder 2005 with JDK
>5.0 and it runs very well through JBuilder.
>I am in process of making jar of the same application, After building
>the jar, when I try to run it using "java -jar RDH.jar"

If your JBuilder2005 use a Jdk1.5 to compile, the .class files and the .jar files could be executed only by a Jdk1.5.
To compile in 1.4 version using jdk1.5 you must specify the -target option.
If you use JBuilder2005 to compile, you must set the project properties with target option 1.4.
If you use javac to compile, you must use like following:
(supposing your jdk1.5 is on /jdk1.5/bin directory)
/jdk1.5/bin/javac -target 1.4 yourfile.java

See here for detail:

Hope this could help you.
Bye, Giant.

CEHJConnect With a Mentor Commented:
Open a command prompt and type

which java

Choose the version that's 1.5 and use the whole path to run the app
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.