title: Java servlet java.lang.NoClassDefFoundError: org/json/JSONObject
body: <p>I have a very simple servlet,when I add the JSON library and try to run it i have <code>java.lang.NoClassDefFoundError: org/json/JSONObject</code> (without the json library every thing works fine).
  I am compiling like this (in ubuntu) :</p>
  
  <pre><code>javac  -classpath ":./libs/json-20160810.jar:/usr/local/tomcat/lib/servlet-api.jar:." *.java &amp;&amp; mv *.class /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/
  </code></pre>
  
  <p>It compiles without any errors, it occurs at runtime.</p>
  
  <p>I am not using any IDE for this.</p>
  
  <p>The servlet is running in a docker:</p>
  
  <p>the docker file :</p>
  
  <pre><code>FROM tomcat:7
  
  RUN apt-get update
  RUN apt-get install default-jdk --yes
  
  COPY . /src
  
  WORKDIR /src/
  
  RUN mkdir -p /usr/local/tomcat/webapps/ROOT/WEB-INF/classes
  
  RUN javac  -classpath ./libs/json-20160810.jar:/usr/local/tomcat/lib/servlet-api.jar:. *.java &amp;&amp; mv *.class /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/
  
  RUN cp web.xml /usr/local/tomcat/webapps/ROOT/WEB-INF
  </code></pre>