Exception in thread "main" !!!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Exception in thread "main" !!!

  1. #1
    Join Date
    Jan 2006
    Posts
    1

    Exception in thread "main" !!!

    Hi guys, i am very new to Java aswell as to this forum this is my first post.

    I hope someone can help me here.

    when trying to run a simple HelloWorld program i get an error

    exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld

    javac HelloWorld.java works fine, it compiles
    but java HelloWorld doesnt run what can i do to fix this?

    I've put HelloWorld.java and HelloWorld.class in C:\Tests, and i run it from that directory using Notepad++

    any help would be welcome.

    oh and i forgot this problem started after i installed Quicktime.

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    I can't see how quicktime can be the culprit here (having messed up the path to the java/javac ?) cause the error message is from the Java VM. You should post your code here (I am betting on a typo or package error... ).
    eschew obfuscation

  3. #3
    Join Date
    Dec 2005
    Posts
    48
    The most reasonable solution is to set classpath correctly.
    You can also use IDE,for example jcreator LE(free) to execute.

Similar Threads

  1. Replies: 4
    Last Post: 12-29-2008, 09:25 AM
  2. Exception in thread "main"
    By SeanB in forum Java
    Replies: 3
    Last Post: 04-02-2007, 06:51 PM
  3. Getting a thread to throw an exception
    By jjamesis in forum Java
    Replies: 4
    Last Post: 04-02-2007, 06:37 PM
  4. Exception in thread "main"
    By Sean in forum Java
    Replies: 0
    Last Post: 03-29-2002, 08:28 PM
  5. Replies: 1
    Last Post: 10-29-2000, 05:51 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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center