title: Tomcat ClassPath Not Working For Javac Compilation
body: <p>I am trying to compile a servlet on my tomcat classpath and it will not work even though I believe I have the right command. I want to use json utils for parsing and the obvious servlets api. However, I cannot get the package to be ever found. I reinstalled java, which is java 11, and I also reinstalled Tomcat, which is Tomcat 10. This is on a Windows machine.</p>
  <p>This is what I do in the console and what gets outputted.</p>
  <pre><code> D:\Tomcat\apache-tomcat-10.0.2\webapps\helloservlet\WEB-INF&gt;javac -cp 
     &quot;.;D:/Tomcat/apache-tomcat-10.0.2/lib/servlet-api.jar;D:/Tomcat/apache-tomcat- 
    10.0.2/lib/tomcat-util.jar;.;&quot; -d classes src\mypkg\HelloServlet.java -source 
     1.8 -target 1.8
  
    warning: [options] bootstrap class path not set in conjunction with -source 8
    src\mypkg\HelloServlet.java:9: error: cannot find symbol
    public class HelloServlet extends HttpServlet {
                                    ^
    symbol: class HttpServlet
  src\mypkg\HelloServlet.java:11: error: cannot find symbol
     public void doGet(HttpServletRequest request, HttpServletResponse response)
                       ^
    symbol:   class HttpServletRequest
    location: class HelloServlet
  src\mypkg\HelloServlet.java:11: error: cannot find symbol
     public void doGet(HttpServletRequest request, HttpServletResponse response)
                                                   ^
    symbol:   class HttpServletResponse
    location: class HelloServlet
  src\mypkg\HelloServlet.java:12: error: cannot find symbol
                 throws IOException, ServletException {
                                     ^
    symbol:   class ServletException
    location: class HelloServlet
  src\mypkg\HelloServlet.java:4: error: package javax.servlet does not exist
  import javax.servlet.*;
  ^
  src\mypkg\HelloServlet.java:5: error: package javax.servlet.http does not exist
  import javax.servlet.http.*;
  ^
  src\mypkg\HelloServlet.java:6: error: package org.apache.json.util does not exist
  import org.apache.json.util.*;
  ^
  src\mypkg\HelloServlet.java:10: error: method does not override or implement a method from a supertype
     @Override
     ^
  src\mypkg\HelloServlet.java:15: error: cannot find symbol
            JSONObject j = new JSONObject(request);
            ^
    symbol:   class JSONObject
    location: class HelloServlet
  src\mypkg\HelloServlet.java:15: error: cannot find symbol
            JSONObject j = new JSONObject(request);
                               ^
    symbol:   class JSONObject
    location: class HelloServlet
  10 errors
  1 warning
  </code></pre>