Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Chapter 1 - Advice Client

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I compile the AdviceClient, I'm getting error 'headfirst' package does not exist.

I gave following compile command from my project directory (c:ejbprojects\advice)

javac -classpath {$CLASSPATH}:AdviceAppClient.jar;C:\j2sdkee1.3.1\lib\j2ee.jar AdviceClient.java

I got following error...

AdviceClient.java:18: package headfirst does not exist (for all headfirst package classes).

But when I extract the AdviceAppClient.jar file to project directory (c:\ejbprojects\advice) and compiled using following command, it worked fine ( Also I ran the client and got the expected results)

javac AdviceClient.java

Any idea! Why I could not directly use AdviceAppClient.jar file during the compilation.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hii ,

You can use this command for Windows environment:
javac -classpath %CLASSPATH%;AdviceAppClient.jar;. AdviceClient.java

With HF they ppl have worked it out on unix environment.
As to why you cant directly write java AdviceClient : You must actually be able to tell the client where are your classes located.


Thankz
Puneet

SCJP 1.4
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic