This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Head First page 57 program

 
Vishal Gupta
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vishal Gupta
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Hanna ! I had been struggling with it for the last 2 hours.
It works now ..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic