Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help!: AdviceClient.java does not compile

 
Svitlana Dukhovna
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic