Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-19-2011, 07:26 AM   PM User | #1
gong
New to the CF scene

 
Join Date: Aug 2011
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
gong is an unknown quantity at this point
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
gong is offline   Reply With Quote
Old 12-30-2011, 07:45 AM   PM User | #2
albert.chiu
New to the CF scene

 
Join Date: Dec 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
albert.chiu is an unknown quantity at this point
That mean's you can compile a java file at the relative path.
albert.chiu is offline   Reply With Quote
Old 12-30-2011, 06:33 PM   PM User | #3
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,752
Thanks: 4
Thanked 2,468 Times in 2,437 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Quote:
Originally Posted by albert.chiu View Post
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.
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
albert.chiu (12-31-2011)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:37 PM.


Advertisement
Log in to turn off these ads.