• 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
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

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.
 
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic