Results 1 to 4 of 4
  1. #1
    Kareng is offline Member
    Join Date
    Aug 2009
    Posts
    35
    Rep Power
    0

    Default Could not find the main class:

    Hi,

    I run my jsp file with jstl inside and Netbean IDE gave me the following errors.


    java.lang.NoClassDefFoundError: org/netbeans/modules/web/project/ant/JspCSingle
    Caused by: java.lang.ClassNotFoundException: org.netbeans.modules.web.project.ant.JspCSingle
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
    at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:320)
    Could not find the main class: org.netbeans.modules.web.project.ant.JspCSingle. Program will exit.
    Java returned: 1
    BUILD FAILED (total time: 1 second)

    Hope someone can tell me where lies the problem.

    Thanks.
    Last edited by Kareng; 09-18-2011 at 06:07 AM.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

    Default Re: Could not find the main class:

    NoClassDefFoundError == the class cannot be found. Make sure all classes/libraries you need are on the classpath.

  3. #3
    Kareng is offline Member
    Join Date
    Aug 2009
    Posts
    35
    Rep Power
    0

    Default Re: Could not find the main class:

    Quote Originally Posted by doWhile View Post
    NoClassDefFoundError == the class cannot be found. Make sure all classes/libraries you need are on the classpath.
    Thank you for your reply but how do I know if all my classes/libraries are on the classpath?

    Hope to hear from you soon. thanks.

  4. #4
    gopakumar is offline Member
    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0

    Default Re: Could not find the main class:

    That you can set build path for your project in netBeans. try googling how to set build path to java project in netbeans.

    Regards,
    Gopakumar

Similar Threads

  1. Could not find or load main class BubbleSort.class
    By blaqkout in forum New To Java
    Replies: 5
    Last Post: 09-12-2011, 08:54 PM
  2. Could not find main class
    By yetty4ever in forum New To Java
    Replies: 7
    Last Post: 02-16-2011, 08:38 PM
  3. could not find main class?
    By deathnote202 in forum New To Java
    Replies: 6
    Last Post: 05-10-2010, 09:57 PM
  4. Could not find main class
    By Andyj in forum New To Java
    Replies: 2
    Last Post: 10-06-2009, 01:47 AM
  5. JVM Could not find main class
    By banduskank in forum Advanced Java
    Replies: 2
    Last Post: 06-24-2008, 09:05 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
  •