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.
I managed to compile it sucessfully using the following command on the terminal:
~/Desktop$ javac snmpclient/Client.java -classpath ./snmpclient/snmp.jar
Then I tried to run it with this command:
~/Desktop$ java snmpclient.Client -classpath ./snmpclient/snmp.jar
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.
Any idea on how I can solve this?
package snmpclient;instruction in the top? Give us the error text also, it helps a lot.