aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes Unable to find javax.ejb package Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "Unable to find javax.ejb package" Watch "Unable to find javax.ejb package" New topic
Author

Unable to find javax.ejb package

Rahul Iyer
Greenhorn

Joined: Mar 17, 2007
Posts: 8
Hi,
I have written a program that runs the following imports:
import headfirst.*;
import javax.ejb.*;

When I run the following command:
javac -classpath {$CLASSPATH}:AdviceAppClient.jar AdviceClient.java

I get the following errors:
package headfirst does not exist
package javax.ejb does not exist

The funny thing is that if I try to compile using the following command:
javac AdviceAppClient.jar
then I do not get the error "package javax.ejb does not exist" , but I still get the error "package headfirst does not exist".

The file headfirst package is in a subdirectory called classes

Please help!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35443
    
    9
You need to add all classes that are used to the classpath. Try something like

javac -classpath classes:/path/to/ejb/classes/ejb.jar AdviceClient.java

and include the proper path to the jar file containing the EJB classes.


Android appsImageJ pluginsJava web charts
Rahul Iyer
Greenhorn

Joined: Mar 17, 2007
Posts: 8
Hi Ulf,
Thanks a lot!
It compiles just fine now.
 
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: Unable to find javax.ejb package
 
Similar Threads
AdviceClient compiler error in HFE
Error while compiling
Compiling Client
Chapter 1 - Advice Client
problem on hfejsb page 57