• Post Reply Bookmark Topic Watch Topic
  • New Topic

msg package javax.ejb.* does not exist

 
Graham Russell
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working through the example code in the first chapter of Head First EJB. I compiled my interfaces and bean fine. Ran the deploytool. Fine.
Now I cannot compile my client, even though the bean & interfaces imported javax.ejb.* fine. What can be wrong? (When I compiled with {$CLASSPATH} I could not import the headfirst package. Taking it out got that to work). And I can import javax.rmi.* fine in the client code.

C:\EJBProjects\advice>javac -classpath AdviceAppClient.jar AdviceClient.java
AdviceClient.java:1: package javax.ejb does not exist
import javax.ejb.*;
^
AdviceClient.java:25: cannot access javax.ejb.EJBHome
file javax\ejb\EJBHome.class not found
Advice advisor = home.create();
^
AdviceClient.java:26: cannot access javax.ejb.EJBObject
file javax\ejb\EJBObject.class not found
System.out.println(advisor.getAdvice());
^
3 errors
 
Graham Russell
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I searched the website and found a similar gripe. Using

javac -classpath %CLASSPATH%;AdviceAppClient.jar AdviceClient.java

solved the problem. (Windows XP).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!