Thanks Gary; but the fault was mine why it wasn't working.
I went back to double check to see if I had properly set the CLASSPATH, when I saw that I had actually set it in the Path by mistake. Fixed that and abredacabra it worked.
Now the interesting question is why did it compile?
Because if you are using a collection and you forget to import it, it won't compile at all. What is the difference?
I'll wait until one of the smarter folks answer to this thread.
Joined: Feb 10, 2010
My thinking why it compiled was because it was able to find the jar file in the path, but when I tried to run the script, it was looking in the CLASSPATH and couldn't find anything and gave the error message. Of course I may be wrong, but then again I may be right. I think I just quoted a a Billy Joel song.
When you do this, again, it will ignore your CLASSPATH system property, and just use the path you give it. Note that I added ".;" at the beginning, so that it also finds the current directory. That's usually a good idea.