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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mick BarryJava DeveloperCommented:
either use 1.5 to run it
or compile it wiuth option -target 1.4

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rohitdivasAuthor Commented:
how to use 1.5 to run it ? Can you write down the whole command ?
for Mac OS
Mick BarryJava DeveloperCommented:
you need to know where it is installed
>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.

Open a command prompt and type

which java

Choose the version that's 1.5 and use the whole path to run the app
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.