Results 1 to 6 of 6
  1. #1
    naushad is offline Member
    Join Date
    Sep 2009
    Posts
    3
    Rep Power
    0

    Default Exception in thread "main" java.lang.NoClassDefFoundError:

    1.I have connected a sql server database with only one table in it and there are about 120,000 records in it.

    2. I created a form through NETBEANS IDE 6.7.1
    Where I run this i got a out of memory error.
    .
    3. I typed java Xmx1024 CISrefnoApp.class in the following directory whe i have my project classes


    Directory of C:\Users\Administrator\Documents\NetBeansProjects\ CISrefno\build\classes\cisrefno

    09/29/2009 12:06 PM <DIR> .
    09/29/2009 12:06 PM <DIR> ..
    09/29/2009 12:06 PM 5,967 CISrefnoAboutBox.class
    09/29/2009 12:06 PM 1,164 CISrefnoApp.class
    09/29/2009 12:06 PM 868 CISrefnoView$1.class
    09/29/2009 12:06 PM 1,083 CISrefnoView$2.class
    09/29/2009 12:06 PM 2,249 CISrefnoView$3.class
    09/29/2009 12:06 PM 1,007 CISrefnoView$4.class
    09/29/2009 12:06 PM 975 CISrefnoView$5.class
    09/29/2009 12:06 PM 2,679 CISrefnoView$RefreshTask.class
    09/29/2009 12:06 PM 2,326 CISrefnoView$SaveTask.class
    09/29/2009 12:06 PM 17,796 CISrefnoView.class
    09/29/2009 12:06 PM 10,228 DebtTran.class
    11 File(s) 46,342 bytes
    2 Dir(s) 34,716,041,216 bytes free

    4. And I got the follwoing result. what was the reason and how to resolve this. thankx in advance for your valuable time

    C:\Users\Administrator\Documents\NetBeansProjects\ CISrefno\build\classes\cisrefn
    o>Java -Xmx1024 CISrefnoApp.classcls
    Exception in thread "main" java.lang.NoClassDefFoundError: CISrefnoApp/classcls
    Caused by: java.lang.ClassNotFoundException: CISrefnoApp.classcls
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: CISrefnoApp.classcls. Program will exit.

    C:\Users\Administrator\Documents\NetBeansProjects\ CISrefno\build\classes\cisrefn
    o>

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Where is the class CISrefnoApp.classcls?It's required on the classpath.

  3. #3
    naushad is offline Member
    Join Date
    Sep 2009
    Posts
    3
    Rep Power
    0

    Default

    there is no file called .classcLs in my entire system and it was a typing mistake.
    I re-typed it java -Xmx1024 CISrefnoApp.class and getting the same error again
    and this class is residing in C:\Users\Administrator\Documents\NetBeansProjects\ CISrefno\build\classes\cisrefno
    Last edited by naushad; 09-29-2009 at 11:38 AM.

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    When running a Java class, you don't add the .class at the end of the class name.

  5. #5
    naushad is offline Member
    Join Date
    Sep 2009
    Posts
    3
    Rep Power
    0

    Default

    received the following message when i typed java -Xmx1024 CISrefnoApp

    got d message "Exception in thread "main" java.lang.noclassdefounderg. CISrefnoApp <wrong name :cisrefno/CISrefnoAppp

    difference here is it says wrong name
    Last edited by naushad; 09-29-2009 at 12:15 PM.

  6. #6
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    As you can see from the message, your class needs a class called CISrefnoApp.classcls and it can't find it.

Similar Threads

  1. Replies: 12
    Last Post: 06-06-2012, 09:04 AM
  2. Replies: 1
    Last Post: 04-02-2009, 09:50 PM
  3. Replies: 8
    Last Post: 09-18-2008, 12:55 PM
  4. Replies: 6
    Last Post: 08-18-2008, 06:44 AM
  5. Replies: 2
    Last Post: 08-01-2007, 05:26 AM

Posting Permissions

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