Results 1 to 2 of 2
  1. #1
    tommy is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default Exception in thread "main" java.lang.NoClassesDefFoundError

    when I try to compile this java file this error appears
    Java Code:
    Error message:
    Exception in thread "main" java.lang.NoClassesDefFoundError: City/java
    This is my code:
    Java Code:
    public class City
    {
    public static void main ( String args[] )
    {
      String city= "Connecticut"
    System.out.println("city");
    }
    }

  2. #2
    Swamipsn is offline Member
    Join Date
    Jul 2007
    Posts
    74
    Rep Power
    0

    Default

    Hi,
    I test your code. Its compile & run properly but a ";" is needed at line 6. Please check with your class path settings

Similar Threads

  1. Replies: 8
    Last Post: 03-05-2011, 03:53 AM
  2. Replies: 1
    Last Post: 08-07-2007, 07:10 AM
  3. Replies: 1
    Last Post: 08-06-2007, 06:07 AM
  4. Replies: 1
    Last Post: 07-25-2007, 10:55 PM
  5. Replies: 1
    Last Post: 07-16-2007, 06:32 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
  •