Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

msg package javax.ejb.* does not exist  RSS feed

 
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).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!