aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes help!: AdviceClient.java does not compile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "help!: AdviceClient.java does not compile" Watch "help!: AdviceClient.java does not compile" New topic
Author

help!: AdviceClient.java does not compile

Svitlana Dukhovna
Ranch Hand

Joined: Jan 13, 2004
Posts: 37
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

Joined: Jan 13, 2004
Posts: 37
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help!: AdviceClient.java does not compile
 
Similar Threads
Error while compiling
head first ejb pg:57 client problem!!!please help urgent
how to run a client?
Error compiling the AdviceClient.java
AdviceClient compiler error in HFE