How do you use the Mac command line for Java?
Could someone please write in numbered, step-by-step instructions how to run compile and run a basic java file using the Mac OS 10.6.x Terminal?
Assume I wrote a Hello World type of program, and that it typed *perfectly*.
Assume the file is called basketball and has been saved as a plain text file on the Mac with its file extension named .java as it is supposed to be: basketball.java
I'm looking for a numbered set of instructions something like this:
2)Type this exact thing into the command prompt: ......
3)Then do this exact thing......
4)Then do this...
5)You should see this....
I cannot extrapolate the understanding from Windows. So please no "guessing" from Windows people. I need a Mac-head who knows point-by-point exactly what I'm facing on the screen, and point-by-point what I need to do.
Right now, I'm getting a "file not found" for my basketball.java program.
I first had it in the standard "Documents" directory that the system wants to put everything in by default. That didn't work. So then I tried putting the basketball.java file in the system/library/java folder. That still didn't work.
I find the Mac file structure to be weird to tell you the truth. I simply have no idea what directory to put this file in, or how to tell the Mac Terminal program how to find it.
I'm trying to learn how to code without relying on an IDE. But not being able to get the files found and lined up in the Terminal is really making it difficult.