...

View Full Version : how to compile servlet



gong
12-19-2011, 07:26 AM
Hello everyone,

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


D:\project1\src>javac -classpath ".;d:\tomcat\lib\servlet-api.jar"Ch1Servlet.java

but the result, are like this:


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
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum