This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes help needed on Unsupported error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "help needed on Unsupported error" Watch "help needed on Unsupported error" New topic
Author

help needed on Unsupported error

Praveena Gupta
Greenhorn

Joined: Jun 26, 2006
Posts: 12
Hello friends,
while in teh Bean creation wizard,File->new->Enterprise bean->edit->adding directory structure containing classes->ok->Next->

java.lang.UnsupportedClassVersionError:Could not add headfirst\Advice.class
(Unsupported major.minor version 49.0)

Why am i getting this? Please take a look at the paths i have set.Does this matter here in the exception i am getting?

CLASSPATH: C:\java\J2SESDK1.4;c:\java\j2sdk 5.0\lib;C:\java\J2EESDK1.3.1\lib\j2ee.jar;.;

JAVA_HOME: C:\java\J2SESDK1.4

J2EE_HOME: C:\java\J2EESDK1.3.1

PATH: C:\java\J2SESDK1.4;c:\java\j2sdk 5.0\bin;C:\java\J2EE SDK 1.3.1\bin;C:\java\J2EESDK1.3.1;.;

Please I am stuck in between.NEed your help friends.

Praveena
SCJP 1.5,SCWCD 1.4, UML-486
Shivani Chandna
Ranch Hand

Joined: Sep 18, 2004
Posts: 380
Hello Praveena ,
Use JDK 1.3 Version instead of 1.4. That is recommended for J2EE 1.3

Or

Move to give EJB 3.0 exam with JEE5 & JDK 1.5

Regards,
Shivani
[ July 25, 2007: Message edited by: Shivani Chandna ]

/** Code speaks louder than words */
Praveena Gupta
Greenhorn

Joined: Jun 26, 2006
Posts: 12
Thanks Shivani,
AFter your reply, i went through the installation instructions for jdk1.3.1 for Windows, and found : instead of updating the path variable we can directly compile like C:> \jdk1.3.1_<version number>\bin\javac MyClass.java
and I tried jdk 1.4 here.
And it worked..that means i have to correct my PATH,CLASSPATH variables.

1.4 seems to work fine with j2ee.
As HF EJB has mentioned at the start, that 1.4 would not give any problems as such..But ofcourse in the future if i may get some problems i shall switch to 1.3

Thanks Shivani..your reply helped me a lot..

Praveena.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14685
    
  16

And you should avoid setting different SDKs in your PATH and CLASSPATH. You can have as many SDKs as you want in your machine, but set both PATH and CLASSPATH to use only one of them.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: help needed on Unsupported error
 
Similar Threads
Problems with compiling a class importing from javax.comm
error compiling a servlet
Need help in compiling programs
Simple Ant Build
problem in compiling servlet