title: Java compilation/runtime classpath problems
body: <p>I am trying to build a Java SNMP client. I have a folder on my Ubuntu desktop called snmpclient. Inside that folder I have the main class Client.java and the snmp.jar library, which is used by the main class.</p>
  
  <p>I managed to compile it sucessfully using the following command on the terminal:</p>
  
  <pre><code>~/Desktop$ javac snmpclient/Client.java -classpath ./snmpclient/snmp.jar 
  </code></pre>
  
  <p>Then I tried to run it with this command: </p>
  
  <pre><code>~/Desktop$ java snmpclient.Client -classpath ./snmpclient/snmp.jar
  </code></pre>
  
  <p>But I am getting a "java.lang.ClassNotFoundException" error, saying it can't find the classes of the snmp library. I unzipped the jar file to make sure the classes I am using are all there, and they are.</p>
  
  <p>Any idea on how I can solve this?</p>