• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while compiling

 
Johnson Jose
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am getting the following error while running the client code.
-------------------------------- Start -----------------------------
F:\Java\ejb\HF_EJB\projects\advice>javac -classpath {$CLASSPATH}:AdviceAppClient.jar AdviceClient.java
AdviceClient.java:14: package headfirst does not exist
import headfirst.*;
^
AdviceClient.java:17: package javax.ejb does not exist
import javax.ejb.*;
^
AdviceClient.java:34: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome)PortableRemoteObject.narrow(o,AdviceHome.class);
^
AdviceClient.java:34: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome)PortableRemoteObject.narrow(o,AdviceHome.class);
^
AdviceClient.java:34: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome)PortableRemoteObject.narrow(o,AdviceHome.class);
^
AdviceClient.java:35: cannot resolve symbol
symbol : class Advice
location: class AdviceClient
Advice advisor = home.create();
^
6 errors
------------------------------- End --------------------------------

I have the projects\advice\classes\headfirst directory structure.
and my AdviceAppClient.jar in the projects\advice directory.

I am not sure why it is not able to locate my headfirst package.
Please help me.

Regards
Johnson
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not going to bother giving you all the specific information, but basically you aren't setting up your classpath correctly to include those JARs that container all the necessary things. Also, make sure your j2ee.jar is included in your classpath.

You may want to search the forum for past posts on this topic, which seem to come up on average once every 12 minutes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic