I am having trouble trying to run the Moose Grettings program that can be found in the Create Your First
Java program. I am using windows XP. I followed the instructions, I think I installed the SDK and set the path correctly, and when I type java -version in the command line window it shows java version 1.6.0_23. So I copied and pasted the code from the website into notepad, the file is named MooseGreetings.java and the code is here:
The file path is C:\JavaSrc\MooseGreetings.java. Anyway, I try to complie it as instructed by typing C:\JavaSrc> javac MooseGreetings.java and I get the message "'javac' is not recoginsed as an internal or external operable program or batch file". I then try to do it a different way by typing "java" instead of "javac" like this: C:\JavaSrc>java MooseGreetings.java and I get the message "Exeption in
thread "main" java.lang.NoClassDefFoundError: MooseGreetings/java Caused by: java.lang.ClassNotFoundExcetpion: MooseGreeting.java at java.net.URLClassLoader$1.run<unknown Source> at .. " and it goes on. Does anyone know what I am doing wrong? This seems like it should be pretty simple..