This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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

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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic