DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2006
    Posts
    5

    Question Exception in thread "main" java.lang.NoClassDefFoundError: MyApp

    hi all,

    I'm getting the mentioned error while trying to run my app. I'm using TextPad to compile and run my app. i have also try to run from command prompt but it shows same error. I have checked my jdk bin dir and jre bin dir. Both of them are the correct path. where did I go wrong?

    rgds,
    jpdbay

  2. #2
    Join Date
    Jul 2005
    Posts
    78
    Silly question, but do you have a main class?

    Have you tried explicitly putting the classpath when running from the command prompt?

  3. #3
    Join Date
    Mar 2006
    Posts
    5
    of coz I hv main class and tried explicitly to run but still I'm getting same error.

  4. #4
    Join Date
    Jul 2005
    Posts
    78
    This is what I was looking for.

    http://forum.java.sun.com/thread.jsp...rt=15&tstart=0

    This helped when I was getting the same error.

  5. #5
    Join Date
    Mar 2006
    Posts
    37
    Just curios but have you been able to fix this problem?

  6. #6
    Join Date
    Mar 2005
    Location
    UK, London
    Posts
    150
    I think your custom enviroment varibales are messed up. Do a search on how to set your CLASSPATH in the enviroment variable.

  7. #7
    Join Date
    Apr 2006
    Posts
    2

    set " . " in classpath

    hello friend,

    this problem "class not found " boz of u save your class in this folder you run in same folder,or in your classpath u not use ". ",
    for example set your classpath like this:
    c:\rahul>set classpath=%classpath%;.
    see i wrote " ." in the end of classpath.
    "." means current folder included that means classes are also find in current folder.
    --diwakar

  8. #8
    Join Date
    Apr 2007
    Posts
    11
    Attach software www.cajoon.com to your Java environmeny (J2SE, J2EE) and get 'root-cause' for every exception

Similar Threads

  1. Replies: 4
    Last Post: 12-29-2008, 08:25 AM
  2. Exception in thread "main"
    By SeanB in forum Java
    Replies: 3
    Last Post: 04-02-2007, 05:51 PM
  3. Getting a thread to throw an exception
    By jjamesis in forum Java
    Replies: 4
    Last Post: 04-02-2007, 05:37 PM
  4. Exception in thread "main"
    By Sean in forum Java
    Replies: 0
    Last Post: 03-29-2002, 07:28 PM
  5. Replies: 2
    Last Post: 10-27-2000, 03:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links