• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Head First page 57 program

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Hanna ! I had been struggling with it for the last 2 hours.
It works now ..
 
Grow a forest with seedballs and this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic