java runs fine with 'absolute' path, doesn't run with CLASSPATH specified
<p>my program is in <code>package pl.edu.uj.tcs.crazySocket;</code> due to some requirements. I work in the crazySocket directory. In order to compile the program I use command</p>

<pre><code>CLASSPATH=~/prog/colosseum/data javac tictactoe.java
</code></pre>

<p>and that succeeds. I want to run the program. I change javac to java and get rid of the '.java'. I get</p>

<pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: tictactoe
Caused by: java.lang.ClassNotFoundException: tictactoe
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
</code></pre>

<p>when I get up in the tree directory to the ~/prog/colosseum/data and run <code>java pl/edu/uj/tcs/crazySocket/tictactoe</code> all works fine.</p>

<p>What's wrong with the CLASSPATH? Shouldn't it work both with javac and java?</p>
