Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to find javax.ejb package

 
Rahul Iyer
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rahul Iyer
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,
Thanks a lot!
It compiles just fine now.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic