title: Setting Classpath using command prompt in Windows 7
body: <p>I am compiling my code through Windows 7 using command prompt -- here are details :</p>
  
  <p>I set the class path like this :</p>
  
  <pre><code>set classpath= %classpath%;C:\java-programes\Servlet-Programing-new1\TotalUsersOnline\lib\servlet-api\*.jar;C:\java-programes\Servlet-Programing-new1\TotalUsersOnline\lib\servlet\*.jar;
  </code></pre>
  
  <p>and then I tried to compile my file like :</p>
  
  <pre><code>javac -d ..\classe com\java\controller\LoginServlet.java
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>com\java\controller\LoginServlet.java:7: package javax.servlet does not exist
  import javax.servlet.RequestDispatcher;
                      ^
  
  com\java\controller\LoginServlet.java:8: package javax.servlet does not exist
  import javax.servlet.ServletException;
                      ^
  
  com\java\controller\LoginServlet.java:9: package javax.servlet.http does not exist
  import javax.servlet.http.HttpServlet;
                           ^
  
  com\java\controller\LoginServlet.java:10: package javax.servlet.http does not exist
  import javax.servlet.http.HttpServletRequest;
                           ^
  
  com\java\controller\LoginServlet.java:11: package javax.servlet.http does not exist
  import javax.servlet.http.HttpServletResponse;
                           ^
  
  com\java\controller\LoginServlet.java:13: cannot find symbol
  symbol: class HttpServlet
  public class LoginServlet extends HttpServlet{
                                    ^
  
  com\java\controller\LoginServlet.java:21: cannot find symbol
  symbol  : class HttpServletRequest
  location: class com.java.controller.LoginServlet
          public void service(HttpServletRequest request, HttpServletResponse response)
                              ^
  
  com\java\controller\LoginServlet.java:21: cannot find symbol
  symbol  : class HttpServletResponse
  location: class com.java.controller.LoginServlet
          public void service(HttpServletRequest request, HttpServletResponse response)
                                                          ^
  
  com\java\controller\LoginServlet.java:22: cannot find symbol
  symbol  : class ServletException
  location: class com.java.controller.LoginServlet
                          throws ServletException, IOException {
                                 ^
  
  com\java\controller\LoginServlet.java:46: cannot find symbol
  symbol  : class RequestDispatcher
  location: class com.java.controller.LoginServlet
                  RequestDispatcher dispatcher = request.getRequestDispatcher("/home.jsp");
                  ^
  
  com\java\controller\LoginServlet.java:20: method does not override or implement a method from a supertype
          @Override
  </code></pre>
  
  <p><strong>after that I tried like :</strong> </p>
  
  <pre><code>javac  -classpath C:\java-programes\Servlet-Programing-new1\TotalUsersOnline\lib\servlet-api\*.jar com\java\controller\LoginServlet.java
  </code></pre>
  
  <p><strong>then the output I got is :</strong> </p>
  
  <pre><code>javac: invalid flag: C:\java-programes\Servlet-Programing-new1\TotalUsersOnline\lib\servlet-api\servlet-api-2.5.jar
  Usage: javac &lt;options&gt; &lt;source files&gt;
  use -help for a list of possible options
  </code></pre>
  
  <p>Please Help on this As I am stuck on this point and I am not getting anything..how to go forward.I need help badly :(</p>
  
  <p>Thanks in Advance </p>