Here are some tips that might just save you the 4 hours I lost.
When compiling a standard file, use the following:
When you are compiling a file that will be used by other files/classes, (import statements) use the following
javac -d . [filename].java
** The dot will save you the hassle of typing in the whole folder structure.
When compiling a file that uses other files, first compile the files with the aforementioned command, then execute the following
javac -classpath . [filename].java
** This works if all the java files are in the same folder, I have not tried to compile with java files in various folders.
Lastly, if you file uses other files, and will be used by other files, use the following
javac -d . -classpath . [filename].java
Now that you have compiled your code, and you have a happy grin on your face, use the following to execute the code:
just enter the file/class name, eg Student, not Student.class. if you add the .class extension, java complains, and you get all sad.
A really useful bit of code to add to your classes, while you are testing:
**this will stop the application and you can view output before you continue, by pressing enter.