aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes classpath issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "classpath issue" Watch "classpath issue" New topic

classpath issue

Amit Batra
Ranch Hand

Joined: Mar 04, 2006
Posts: 361

Im new to EJB. I was trying to compile the AdviveBean in the K&B, when I received a message
package javax.ejb.* doesnt exist. so I read that having the following line in my classpath while compiling would make it work. "javac -cp c:\j2ee1.4\lib\j2ee.jar" And it did.

But when I try set it as an environ variable. I again get the original error. I have two questions now
1. How can I set it up so that I wont have to type javac -cp.... again?
2. What does the .jar file have to do with all this?

Charlie A

Joined: Apr 17, 2005
Posts: 19
Can you write down the procedure, how you tried to set the environment variable for CLASSPATH? Hope some output can come out of it..

When the world says, "Give up,"<br />Hope whispers, "Try it one more time."
Amit Batra
Ranch Hand

Joined: Mar 04, 2006
Posts: 361
HI thanks Ive gotten it. I had made the mistake of adding a space between 'Path' and '='.
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
javac doesn't take a -cp parameter, only a -classpath parameter.
In that it's different from java, which accepts either.

One of the mysteries surrounding the design choices of Sun's software engineers

It is sorta covered in the JavaRanch Style Guide.
subject: classpath issue
Similar Threads
Cannot find symbol error on compile, (and I tried to keep this really simple)
Error in Servlet compilation
Help with compiling
classpath and 'current directory'
Some problems with testing with JUnit