I have the following directory structure:
folder1/
folder2/
compiler.java
For a school assignment, we have to be able to run the following commands from folder1:
javac folder2/compiler.java
java folder2/compiler
The compilation with javac works. When I try to run it with the above java command, I get a
Exception in thread "main" java.lang.NoClassDefFoundError: folder2/compiler (wrong name: compiler)
java folder2.compiler.javainstead ofjava folder2.compiler?