Results 1 to 6 of 6

Thread: Java applet errors

  1. #1
    Join Date
    Dec 2009
    Posts
    12

    Java applet errors

    I have IBM Pentium D desktop computer with Windows XP and Mac as dual operating system on it. I am a beginner programmer and learning programming languages like Core Java, C++, DBMS, Html and C sharp. When i run java applets on XP, it works fine but when on MAC it gives me errors i.e
    java.lang.NoClassDefFoundError
    java.lang.NoSuchFieldError: BLACK
    java.lang.NoClassDefFoundError
    I don't what is the problem on MAC? Please help me

  2. #2
    Join Date
    Apr 2008
    Posts
    1,949

    Re: Java applet errors

    I am not that much sure, but according to me there is problem with the code that is written in java, nothing else. The error i.e java.lang.NoClassDefFoundError arrives when the file cannot be found. Example: if we type in "java ababab" in the command prompt, then you tget that error. I don't think there is any problem in java code running on XP or MAC. Hope your problem get solved.

  3. #3
    Join Date
    May 2008
    Posts
    2,015

    Re: Java applet errors

    My studies about JAVA says that, the error java.lang.NoClassDefFoundError comes when there some problem with the classpath. In short, thi means that the classpath is incorrectly. So, unsure that your JAVA_HOME is set up right and classpath is set rightly. Also check that the JAVA is completed install perfectly and jdk should be working correctly. Hope your problem get solve soon, and will be to do your programming.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,010

    Re: Java applet errors

    I would firstly recommend you to run any of the SDK examples program on the MAC operating system And if the SDK examples does not work , then it would be the classpath problem. If you want to verification of this, you can try invoking java using the cp switch to tell it explicitly where to find the class. E.g: if your prac.class is in a directory called c:\java1, then you could try java -cp c:\java1 prac. If this work properly then we can saythat it is classpath problem only. Correct the class path and problem will be solved.

  5. #5
    Join Date
    May 2008
    Posts
    2,302

    Re: Java applet errors

    According to me this error comes because it could not find the core class. This error conditions like this are not applicable with the JVM developers spending time on. There could be hundreds of reasons for this error. And it occurs so seldom that it isn't worth them wasting their time. I would tell you to re-install the whole java software again and try running that some program and check it gives runs perfectly or not. Hope your problem will get solve.

  6. #6
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Java applet errors

    I think there something incorrect while typing the class name. The errors you mentioned occurs when write the class name incorrect. i.e if class is Testdemo and you would writing it has testdemo, this will definitely give you error. And this is done correctly then the problem would be with the classpath. Set the class path correctly and try this your errors will get fix.
    Last edited by Modifier; 12-01-2010 at 11:13 AM.

Similar Threads

  1. How to run java applet program using cmd
    By Rao's in forum Software Development
    Replies: 3
    Last Post: 07-01-2012, 02:35 PM
  2. Zoom in on a Java Applet?
    By Bharata in forum Software Development
    Replies: 6
    Last Post: 21-10-2010, 07:01 AM
  3. Adobe AIR support with Java Applet?
    By Head-Hunter in forum Windows Software
    Replies: 4
    Last Post: 30-06-2010, 01:08 PM
  4. Difference between Applet and Japplet in java
    By Jalabala in forum Software Development
    Replies: 3
    Last Post: 21-11-2009, 06:48 AM
  5. Refresh Java Applet
    By Brake Fail in forum Software Development
    Replies: 6
    Last Post: 16-03-2009, 10:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •