Referring to class in another directory?

Z

zburnham

I have an applet in my Apache tree that needs to call an applet that's
in the Tomcat tree. The directory that the target applet is in is in
my CLASSPATH, in a sub directory /my/path/.

I've tried "import my.path.*", tried referring to the class by
my.path.TargetClass, nothing seems to work. The compiler throws an
error saying "Package my.path does not exist /
my.path.TargetClass.method(arg);

I'm not understanding this one. If the top directory is in my
CLASSPATH shouldn't it not matter where the applet is located in the
file system?

Any help is appreciated.

Z
 
R

Rhino

I have an applet in my Apache tree that needs to call an applet that's
in the Tomcat tree. The directory that the target applet is in is in
my CLASSPATH, in a sub directory /my/path/.

I've tried "import my.path.*", tried referring to the class by
my.path.TargetClass, nothing seems to work. The compiler throws an
error saying "Package my.path does not exist /
my.path.TargetClass.method(arg);

I'm not understanding this one. If the top directory is in my
CLASSPATH shouldn't it not matter where the applet is located in the
file system?

Any help is appreciated.
I'm rusty with servlets and Tomcat but don't you need to have web.xml
entries for each of your servlets in order to reference then correctly? If
memory serves, you don't need web.xml entries for utility classes that
aren't servlets themselves though so maybe that is the situation you are
facing....

Since this is more of a Tomcat issue than a Java one, why don't you try the
HowTo documents for your version of Tomcat; go to http://tomcat.apache.org/
and choose the Documentation link for your version of Tomcat. If you can't
find what you want in the howtos, you can subscribe to the Tomcat mailing
list at http://tomcat.apache.org/lists.html. You'll want the tomcat-users
list, not the tomcat-dev one. The tomcat-users list is quite active with
many posts each day; many of the questions are answered by the Tomcat
developers themselves.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top