Compiling / running Java from one folder up
<p>I have the following directory structure:</p>

<pre><code>folder1/
    folder2/
        compiler.java
</code></pre>

<p>For a school assignment, we <strong>have</strong> to be able to run the following commands <em>from folder1</em>:</p>

<pre><code>javac folder2/compiler.java
java  folder2/compiler
</code></pre>

<p>The compilation with javac works. When I try to run it with the above java command, I get a </p>

<pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: folder2/compiler (wrong name: compiler)
</code></pre>
