Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    how to compile servlet

    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

  • #2
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That mean's you can compile a java file at the relative path.

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    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.

  • Users who have thanked Fou-Lu for this post:

    albert.chiu (12-31-2011)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •