You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by FH...@aol.com on 2009/01/04 02:00:17 UTC
Classpath problem
Hello. I am using Tomcat 6.0.18, my Java version is 1.6.0_11 and I have a
servlet called TestingServlet.java. My classpath reads like this:
.;C:\Sun\SDK\bin; C:\Sun\SDK\jdk\bin; C:\Tomcat\lib\servlet-api.jar
I cannot compile in DOS without typing:
javac -classpath C:\Tomcat\lib\servlet-api.jar TestingServlet.java
I cannot understand why I am being required to specify the servlet api when
I have it in my classpath. I have looked through the manual and Googled for
an answer to this problem without success. Can anyone help me out? Thanks.
**************New year...new news. Be the first to know what is making
headlines. (http://www.aol.com/?ncid=emlcntaolcom00000026)
Re: Classpath problem
Posted by Konstantin Kolinko <kn...@gmail.com>.
2009/1/4 <FH...@aol.com>:
> Hello. I am using Tomcat 6.0.18, my Java version is 1.6.0_11 and I have a
> servlet called TestingServlet.java. My classpath reads like this:
>
> .;C:\Sun\SDK\bin; C:\Sun\SDK\jdk\bin; C:\Tomcat\lib\servlet-api.jar
>
> I cannot compile in DOS without typing:
>
> javac -classpath C:\Tomcat\lib\servlet-api.jar TestingServlet.java
>
> I cannot understand why I am being required to specify the servlet api when
> I have it in my classpath.
I guess that is because spaces are not allowed in the value.
Try:
set CLASSPATH=.;C:\Sun\SDK\bin;C:\Sun\SDK\jdk\bin;C:\Tomcat\lib\servlet-api.jar
or better
set CLASSPATH=.;C:\Tomcat\lib\servlet-api.jar
I do not know why you are adding those bin folders to the classpath.
There are no class files there.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org