||Building a Simple Java Application in Mac OS X|
Response to: Try banging your head against the wall for a bit
It is most likely a problem of packaging. It matters where you put your .java files and from where you do the compiling and running. This example has been used (since it appeared here) in intro classes without problems exactly as it's written. Here are the keys that you may have missed. First, all of the files begin with the package statement "package NineSquares". This means that all of the .java files are inside of a directory with the name "NineSquares". The case must match exactly. Second, your compiling and running of the files must happen from outside of the NineSquares directory. For example the file EachSquare.java is inside of NineSquares. If you try to compile it from inside of NineSquares using "javac NineSquares/EachSquare.java" then the compiler looks for a directory named NineSquares inside of the directory named NineSquares. Inside of this second NineSquares directory it is looking for EachSquare.java.
I don't understand your last comments. My article used cli tools for the running of the java. I stayed away from ProjectBuilder because it is not very good at dealing with packages and tends to be hard for beginning Java programmers for this reason. As for debugging, since adopting test first programming a year and a half ago, I have not found myself in a debugger since.
Showing messages 1 through 2 of 2.