• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

import question

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to EJB. I have a question about page 57 of HFEJB.
Why AdviceClient.java need to import headfirst.* ? Could sby give me a answer? Thanks
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because it uses Advice and AdviceHome classes which are present in the Headfirst package.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I try this example from Head First EJB and when I compile AdviceClient.java I got an error telling me that headfirst.* package doesn't exist. It's the same thing for javax.ejb..

I added lib/j2ee.jar to the classpath and always the same things... somebody can help me?

Thanks,
 
Eric Benoit
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the problem :

In the book, it's {CLASSPATH}:AdviceAppClient.jar

but in WinXP, it's %CLASSPATH%AdviceAppClient.jar

So that problem is now resolved but I got an exception in thread main.. NoClassDefFoundError AdviceClient..
 
Eric Benoit
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got it to work fine, seems to be another classpath error... I have to add the working directory in the classpath..
 
Luke Lee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply.
But I think we already have a jar file which contains the advice.class and adviceHome.class. And we add the jar file to the javac command. I use windows 2000. When i compile, it is showed that javax.ejb.* and headfirt.* can not be found. I hope next edition of HFE could add content on how to compile and run this application on windows.
 
And then the flying monkeys attacked. My only defense was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic