Hi there,
I'm using a third party library which is packaged as a jar in some code that I'm writing. I put the jar file in the classpath environment variable which allowed me to compile my TestJar class (which used the 3rd party library).
However, when I came to run my TestJar class using
java, I got an exception that said that it couldn't find a class TestJar. I was running my program from the command line having cd'd into the directory that the TestJar file was in. I solved my problem by putting the folder that TestJar is in in the classpath, but I don't understand why that is necessary. When I run any other java class that I'm playing around with, I don't have to put it in the classpath and surely that will be using other libraries such as java.util etc.
Grateful for any help.
Thanks
Joe