>>> "Leung, King Sang Eric" <[EMAIL PROTECTED]> 11-Jan-00
7:03:34 AM >>>


>I have in my windows directory 2 .java servlets in the
>same package1.
>Ie.  ..\servlet\package1\a.java
>      ..\servlet\package1\b.java

>c:> javac b.java - ERRORS a.function_a is a invalid name, class
variable...
                                             ^
>CLASSPATH=.c:\jsk1.2.2\jre\lib\rt.jar;c:\jswdk-1.0.1\lib\servlet.jar;c:\
>jswdk-1.0.1\lib\jspengine.jar;c:\jswdk-1.0.1\webpages\WEB-INF\servlets

>Anyone kindly tells me what is wrong? Is it in the program
>declaration, or in the environment setting or else?

The compiler must be able to find the class that you refer to and it
can't.

Most likely this is because the CLASSPATH does not include the
directory where the .class files are being compiled to.

Something like this would probably do the trick:

c:\> javac -d c:\destinationdir  a.java b.java

Note that it is possible to compile both at once.


This is one of the fundamental errors with servlets, compiling
classes to the wrong directory. You will also have to have them in a
particular dir to get them to work as servlets.



Nic Ferrier

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to