John Jai wrote:Avoid using Word. Use any simple text editor like TextPad.
In Notepad / TextPad -> Paste the code in the editor -> Click Save - and select "Save as Type->" as "All Files" and give the name of the class as "MooseGreetings.java".
I'm going to have to admit to being an idiot here...
In the end, John Jai's advice proved to be correct. In notepad, saving as type- all files does indeed leave only the file extension you choose- in this case, .java
It turned out my real problem, after I had switched to notepad, was only being able to open a command prompt onto a folder, not a file. At that point I was incorrectly formatting my file path. I just needed to read a little bit further to figure out where I had gone wrong.
Just as a reference for other newbies who may experience the same frustration, the output of the command format that worked was:
And while I read somewhere that blank space is generally ignored in Java, the spaces here all proved essential.
Who would have thought that I could be so happy to get my screen to read "mooooooooooo" after only six hours of effort?
Thanks again for the help, and I apologize that my ignorance cause me to offer so many red herrings...
(Edit- By the way, the reason the JAVA_HOME and PATH enviromment variables were not saved proved to be because when it said, in "How to Create Your First Java Program at JavaRanch", under Windows XP, Item 8, "Click OK and close all remaining windows" I clicked OK in THAT window and closed the remaining windows using the typical "x" in the upper right corner. What was really needed was to click OK in ALL of the windows, thereby closing them. May I suggest an edit?)