File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Head First page 57 program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Head First page 57 program" Watch "Head First page 57 program" New topic
Author

Head First page 57 program

Vishal Gupta
Greenhorn

Joined: Jul 15, 2004
Posts: 21
hi,
I am having problems compiling the client program on Page 57 in Head First EJB book.
I played with the classpath variable and by putting the AdviceAppClient.jar in the classpath, but am still getting these errors:

AdviceClient.java:9: cannot resolve symbol
symbol : class go
location: class AdviceClient
new AdviceClient.go();
^
AdviceClient.java:17: cannot resolve symbol
symbol : variable PortableRemoteException
location: class AdviceClient
AdviceHome home=(AdviceHome) PortableRemoteException.narrow(o,AdviceHome.cla
ss);
^
2 errors


Can someone point out what else needs to be done?

thanks!


SCJP 1.4, SCWCD 1.4
Hanna Habashy
Ranch Hand

Joined: Aug 20, 2003
Posts: 532
Vishal,
I had the same problem too. Here is how I did it:
First you need to compile your client with yourBean.jar in its path

javac -classpath %CLASSPASS%;yourBean.jar client.java

To run the compiled class, you still need the jar file in its path

java -cp %classpath%;yourBean.jar client

It works for me.


SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
Vishal Gupta
Greenhorn

Joined: Jul 15, 2004
Posts: 21
Thanks Hanna ! I had been struggling with it for the last 2 hours.
It works now ..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head First page 57 program
 
Similar Threads
Error in compiling Advice Client in ejb
Getting compile error for AdviceClient.java from Head First EJB
problem on hfejsb page 57
how to run a client?
Help with compiling AdviceClient.java