tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike LaBudde" <>
Subject Re: beginner question (really) about how JAVA finds classes when compiling
Date Thu, 13 Apr 2000 21:24:42 GMT
Go up one directory level (i.e. the parent to FOO) and issue the command:

javac.exe -d .



At 4/13/2000 04:57 PM -0400, you wrote:
> >>>>> On Thu, 13 Apr 2000 14:36:58 -0400, Christopher Stacy ("C") writes:
>  C> I am running Tomcat (a few weeks old) (with Apache) on NT.
>  C> I am using the default "web.xml" file.
>  C> I have a JSP (located in "webapps/mytop/my.jsp") that invokes a bean 
> FOO.Bean.
>  C> The bean is being loaded from 
> "webapps/mytop/WEB-INF/classes/FOO/Bean.class".
>  C> Now I want the bean to instantiate another class Foo, which is part 
> of the same FOO package.
>  C> The source file "" (like "") begins with a "package 
> FOO" statement.
>  C> I placed "" in the same directory (FOO) and compiled it.
>  C> However, the following statement in will not compile:
>  C>     Foo f = new Foo();
>  C> because it cannot resolve the symbol "Foo".
>  C> How do I tell JAVA how to resolve this symbol and make this work?
>  C> Both classes are in the same package, so I don't think I need to 
> import anything.
>  C> It must be a confusion about where the class files live, or else 
> something even more basic.
>My problem description above could have been a little confusing
>(because it's so simple).  The question is really: I am sitting in
>a directory named FOO trying to javac a file which makes
>reference to the class "Foo".  There is a "" and "Foo.class"
>file sitting in this same directory already.  CLASSPATH includes ".".
>Both classes are in the same package FOO.  What else do I need to do?
>The problem is presumably unrelated to Tomcat.
>(Of course, I still don't realize what the problem is.)
>To unsubscribe, email:
>For additional commmands, email:

View raw message