• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Problem on HFEJB P57,P58

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all JavaRanch professional:

I have a problem in running the book example code in HFEJB P57, P58.
When I do all the things in application deployment tool(RI).
Then I compile the code and run the class file

I use WinXP and install J2SDK1.4.01, J2EE1.3 to run the code.
I follow the book deploy step to deploy the code
I use the follow command to compile the code (that ok, No warning or error)-
"javac -classpath c:\j2sdkee1.3.1\lib/j2eejar;AdviceAppClient.jar AdviceClient.java"

Then I use the follow command to run the class file
"java -cp c:\j2sdkee1.3.1\lib/j2eejar;AdviceAppClient.jar AdviceClient"
The problem occurs, It show!
"Exception in thread "main" java.lang.NoClassDefFoundError: AdviceClient"

What 's going on!


Please Help Me..........
 
Ray Yu
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all JavaRanch Professional

Sorry, I have typo in the above message

The command I use to compile is
"javac -classpath c:\j2sdkee1.3.1\lib\j2ee.jar;AdviceAppClient.jar AdviceClient.java"

The command I use to run the class file is
"java -cp c:\j2sdkee1.3.1\lib\j2ee.jar;AdviceAppClient.jar AdviceClient"

The error of NoClassDefFoundError is show, please help me....
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Such question has been asked many many times here already, why dont you do a search first?

https://coderanch.com/t/158494/java-EJB-SCBCD/certification/these-errors-pg-head-first

Nick
 
Ray Yu
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After I saw the previous post, I solve the problem.
Thanks Nicholas
 
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic