Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

NoClassDefFoundError

  Asked By: Viveka    Date: Aug 19    Category: Java    Views: 465
  

I'm a beginner with java programming i hav just installed JDK1.4 on a windows
98 machine
I compile my java applets and applications with no errors using command "javac"

but I get this error message
"Exception in thread "main" java.lang.NoClassDefFoundError: HelloApp"
when I try to run my application using the command "java" so what is wrong?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Fabia Ferrrari     Answered On: Aug 19

You set up your system path correctly as suggested by
Sun I assumed. The next step is your import
statements. Are they included at the top of your
code?

If you like to pursue the digital language writer
career field, I suggest you need to invest some money
for your tool of trade such as upgrade your hardware
and software to the standard at least. Currently, it
is still OK to use windows to 2000.

But first, follow the two steps above and see if your
program compiled?

 
Answer #2    Answered By: Anuja Shah     Answered On: Aug 19

I believe that you aren't the typedef static in function main

the correct is "public static void main  ....."

always the main function have to be static

 
Answer #3    Answered By: Emma Campbell     Answered On: Aug 19

Two possible reasons:
1. Improper ClassPath setup... see my previous message to set your
path.
2. Improper spelling. Ensure you use the exact same captilization
when naming your class, saving it to file, and running it...

Well those are the 8-9 out of 10 reasons you get a
NoClassDefFoundError.

 
Didn't find what you were looking for? Find more on NoClassDefFoundError Or get search suggestion and latest updates.