File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Compile error in Client Code 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 "Compile error in Client Code" Watch "Compile error in Client Code" New topic

Compile error in Client Code

muhsin sabeer
Ranch Hand

Joined: Oct 01, 2005
Posts: 35
I am preparing for SCBCD.

I am in chapter-1 of HJ EJB. I have no problem when compiling the bean and interfaces. But I have problem when compiling client class. I followed the book but i got compilation error :

package headfirst does not exist
import headfirst.*;

package javax.ejb.* does not exist
import javax.ejb.*;

Classpaths are set correctly according to installation guidence.

Can anyone help me to figure out where am wrong.

Thanks in advance.
Ankit Doshi
Ranch Hand

Joined: Dec 04, 2002
Posts: 222
For the headfirst package you need to have the client jar file in the classpath and for the javax.ejb package you need to have the j2ee.jar file in your classpath. Please check your classpath again.
muhsin sabeer
Ranch Hand

Joined: Oct 01, 2005
Posts: 35
Dear Doshi,

I found out the problem. I got compilation error when I follow exactly as HJEJB. After set up classpath, I compile my client file
as javac and it works.

Thank you very much.
It is sorta covered in the JavaRanch Style Guide.
subject: Compile error in Client Code
Similar Threads
Unable to find javax.ejb package
AdviceBean - compile time erorr
Compiling Client
error compiling ejb, first time prompt compile
NeedJ2EE 1.3 RI server Installation Help