This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
Help with compiling AdviceClient.java
problem on hfejsb page 57
how to run a client?
Getting compile error for AdviceClient.java from Head First EJB