• 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

help!: AdviceClient.java does not compile  RSS feed

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, guys!

Please give me a hand on this: I'm almost done with the first chapter of HF EJB. I was able to compile and deploy AdviceBean and its interfaces just fine. However, when I try to compile AdviceClient.java from ~projects/advice
using the command:
C:\~\projects\advice>javac -classpath {$CLASSPATH}: AdviceAppClient.jar AdviceClient.java

I get the following errors:

AdviceClient.java:4: package headfirst does not exist
import headfirst.*;
^
AdviceClient.java:5: package javax.ejb does not exist
import javax.ejb.*;
^
AdviceClient.java:15: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class
;
^
AdviceClient.java:15: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class
;
^
AdviceClient.java:15: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class
;
^
AdviceClient.java:16: cannot resolve symbol
symbol : class Advice
location: class AdviceClient
Advice advisor = home.create();
^
AdviceClient.java:20: cannot resolve symbol
symbol : method PrintStackTrace ()
location: class java.lang.Exception
ex.PrintStackTrace();
^
7 errors

My Classpath has a reference to j2sdkee1.3.1\lib\j2ee.jar and j2sdkee1.3.1\lib.
What is the problem and how can I fix it? Please help!!!
 
Svitlana Dukhovna
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed it. The problem was in the command I've been using. The correct one for windows is:
javac -classpath %CLASSPATH%;c:/</YOUR_PATH to/>AdviceAppClient.jar AdviceClient.java
 
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!