• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Error while compiling

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic