This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

msg package javax.ejb.* does not exist

 
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).
 
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic