I just worked through this first example in the book and I can't figure out why it issues an error when I try to run it.
public class MyFirstApp {
public static void main (String[] args) { System.out.println("I Rule!"); System.out.println("The World"); }
}
I saved it as MyFirstApp.java. I compiled it (javac MyFirstApp.java) and it generated MyFirstApp.class. I typed at the command line "java MyFirstApp.class" and it says:
Exception in thread "main" java.lang.NoClassDefFoundError: MyFirstApp/class
So what gives? Any help is gratiously appreciated. [ December 18, 2005: Message edited by: zach sycks ]
We're sorry... ... but we can't process your request right now. A computer virus or spyware application is sending us automated requests, and it appears that your computer or network has been infected.
We'll restore your access as quickly as possible, so try again soon. In the meantime, you might want to run a virus checker or spyware remover to make sure that your computer is free of viruses and other spurious software.
We apologize for the inconvenience, and hope we'll see you again on Google.