Results 1 to 6 of 6
  1. #1
    sathishvegeta is offline Member
    Join Date
    Feb 2013
    Posts
    20
    Rep Power
    0

    Default Servlet compiling error

    Hello.. I am trying to compile a servlet using "javac -classpath C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar

    But I get an error as below..

    javac: invalid flag: Files\Apache
    Usage: javac <options> <source files>
    use -help for a list of possible options

    Seeking your help around this.. Thanks..!

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    19

    Default Re: Servlet compiling error

    Stick double quotes around the path to the tomcat jar.
    Please do not ask for code as refusal often offends.

  3. #3
    sathishvegeta is offline Member
    Join Date
    Feb 2013
    Posts
    20
    Rep Power
    0

    Default Re: Servlet compiling error

    Quote Originally Posted by Tolls View Post
    Stick double quotes around the path to the tomcat jar.
    Even-though same error remains

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    19

    Default Re: Servlet compiling error

    Then show your command and the error again.
    Please do not ask for code as refusal often offends.

  5. #5
    sathishvegeta is offline Member
    Join Date
    Feb 2013
    Posts
    20
    Rep Power
    0

    Default Re: Servlet compiling error

    Quote Originally Posted by Tolls View Post
    Then show your command and the error again.
    here is my command and error:

    D:\servletfiles>javac -classpath C:\Program Files\ApacheSoftwareFoundation\Tomcat6.0\lib\servl et-api.jar Sample1.java

    javac:invalid flag: Files\C:\Program Files\ApacheSoftwareFoundation\Tomcat6.0\lib\servl et-api.jar
    usage:javac <options> <source files>
    use -help for a list of possible options

  6. #6
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,018
    Blog Entries
    7
    Rep Power
    20

    Default Re: Servlet compiling error

    Where are the double quotes as Tolls suggested? (see reply #2)

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Keep getting error compiling
    By JayRee in forum New To Java
    Replies: 5
    Last Post: 03-25-2013, 03:05 AM
  2. Compiling a Servlet!!
    By f22raptor in forum New To Java
    Replies: 0
    Last Post: 10-04-2011, 05:12 PM
  3. java servlet not compiling
    By aks_1 in forum New To Java
    Replies: 6
    Last Post: 05-03-2010, 12:34 PM
  4. problem compiling servlet
    By vivek_9912 in forum Java Servlet
    Replies: 1
    Last Post: 02-13-2009, 11:37 AM
  5. Error while compiling
    By ai_2007 in forum Advanced Java
    Replies: 1
    Last Post: 07-01-2007, 11:37 AM

Posting Permissions

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