I'm going through the first chapter of the OCA SE 8 book by Boyarsky and Selikoff. It suggests that I create 2 files in terminal and then compile and run the result.
ClassA.java:
ClassB.java:
The files are in /Users/me/tmp/packagea and /Users/me/tmp/packageb.
From the /Users/me/tmp directory I use
javac packagea/ClassA.java packageb/ClassB.java
to compile the code, and then
java packageb.ClassB
to run it.
All works well until I try to run the code, at which point I get:
Error: Could not find or load main class packageb.ClassB
Any ideas would be welcome. If I can't get through the first chapter I'm doomed!