File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't see other classes inside package??

 
Scott Farran
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi-
Thanks in advance for the help here. I have a web app with a number of classes in a package. I can instantiate a new object (system classes) from any of these classes no problem assuming I use the appropriate import statements. The problem arises when I try to create an object from one of the classes in the same package. It can't see them. I'm able to do it from my JSP pages calling the exact same classes, they just can't see each other from inside the package. Does the package need to be added to the classpath? and if it does then why do my jsp pages have no problem seeing the classes? I am running Tomcat 4.0. Is there a setting that needs to be set in the web.xml? I am a little mystified.
Scott Farran
SCJP
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This does sound like a CLASSPATH/import issue.
I can instantiate a new object (system classes) from any of these classes no problem assuming I use the appropriate import statements.
What does this mean? What is system classes?
If your classes are defined to be in some package, then you do need to import them or fully qualify the class locations when you use them. And the parent directory of the package folder structure does need to be locatable in the CLASSPATH setting (and by the application server).
[ June 21, 2003: Message edited by: Dirk Schreckmann ]
 
tapasvi vaishnav
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi scott :
please check whether current directory is there in your %CLASSPATH% .
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic