Jeff Te wrote:Hello...I am using Netbeans along with Head First Java. When I open up any project and copy and paste the code I get the following error:
run:
Exception in thread "main" java.lang.NoClassDefFoundError: PhraseOmatic
Ideally, the 'NoClassDefFoundError' should come when you run your java class and NOT just after copy, paste the code.
It would be due to the fact that the
IDE is NOT able to pick up the .class file of the class you are attempting to. Does the source file have any package statement? If so
you should create a folder structure matching to that of package hierarchy and then try running it.