• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Problem with page 57. Surprise?!

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have problem, like so many, with compiling the AdviceClient. I've looked at
the different suggestions but it just won't work.
I do as it says on pg 57 and this is what i get:
AdviceClient.java:4: package headfirst does not exist
import headfirst.*;
^
AdviceClient.java:5: package javax.ejb does not exist
import javax.ejb.*;
^
AdviceClient.java:18: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome)
^
AdviceClient.java:18: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome)
^
AdviceClient.java:19: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
PortableRemoteObject.narrow(o, AdviceHome.class)
;
^
AdviceClient.java:21: cannot resolve symbol
symbol : class Advice
location: class AdviceClient
Advice advisor = home.create();
^
6 errors
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you need to add the current directory and j2ee.jar to your classpath.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Provide the current working directory...the place u r compiling from in the classpath aswell..
 
Christer Hedstr�m
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, apparently my classpath was ok (at some point I added the "." for the current directory but my problem remained) because I got through the compilation with this command-line:
javac -classpath %CLASSPATH%;AdviceAppClient.jar AdviceClient.java
When I try to run the client I get the "CORBA BAD_OPERATION"-exception but that's another story (I've haven't have time to look at that on the forum).
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the exception go to the following link:
http://www.wickedlysmart.com/HeadFirst/HeadFirstEJB/HeadFirstEJBNotes.html
cheers,
Jai
 
reply
    Bookmark Topic Watch Topic
  • New Topic