I am trying to run a Java file on a Unix machine. Let me first show the directory structure:
/home/username |_ SimpleMail.java |_ mail.jar
I compiled java code using:
# javac -classpath mail.jar SimpleMail.java
After compilation, the directory has:
/home/username |_ SimpleMail.java |_ mail.jar |_ SimpleMail.class
Now I tried to run this SimpleMail class file. This gives a class error not found: I tried to start the class using:
Error:
The java class is not found: SimpleMail
What is wrong with this process?
Thanks:)
source share