CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Java and JSP (http://www.codingforums.com/forumdisplay.php?f=54)
-   -   how to compile servlet (http://www.codingforums.com/showthread.php?t=246684)

gong 12-19-2011 07:26 AM

how to compile servlet
 
Hello everyone,

I tried to compile my servlet on command prompt like this:

Quote:

D:\project1\src>javac -classpath ".;d:\tomcat\lib\servlet-api.jar"Ch1Servlet.java
but the result, are like this:

Quote:

javac: no source files
Usage: javac <options> <source files>
use -help for a list of possible options
I don't understand what the mean of "-classpath"

please someone help me

Thanks

albert.chiu 12-30-2011 07:45 AM

That mean's you can compile a java file at the relative path.

Fou-Lu 12-30-2011 06:33 PM

Quote:

Originally Posted by albert.chiu (Post 1175559)
That mean's you can compile a java file at the relative path.

Um no. This means you can retrieve the necessary dependencies at either D:\project1\src or at d:\tomcat\lib\servlet-api.jar.
That's not relevant to this particular error though. This error is because the compiler can't tell you have a source file. You are missing a space.


All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.