• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Unable to find javax.ejb package

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have written a program that runs the following imports:
import headfirst.*;
import javax.ejb.*;

When I run the following command:
javac -classpath {$CLASSPATH}:AdviceAppClient.jar AdviceClient.java

I get the following errors:
package headfirst does not exist
package javax.ejb does not exist

The funny thing is that if I try to compile using the following command:
javac AdviceAppClient.jar
then I do not get the error "package javax.ejb does not exist" , but I still get the error "package headfirst does not exist".

The file headfirst package is in a subdirectory called classes

Please help!
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to add all classes that are used to the classpath. Try something like

javac -classpath classes:/path/to/ejb/classes/ejb.jar AdviceClient.java

and include the proper path to the jar file containing the EJB classes.
 
Rahul Iyer
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,
Thanks a lot!
It compiles just fine now.
    Bookmark Topic Watch Topic
  • New Topic