Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Complete noob! Incorrect package and ' Exception in thread "main" java.lang.NoClassDefFoundError:'

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Complete noob! Incorrect package and ' Exception in thread "main" java.lang.NoClassDefFoundError:'

    Ok, so go easy on me, I'm really new to java. Having a bit of trouble in the beginnings of a simple program that I am trying to make -

    Screen Shot 2013-06-28 at 16.46.31.jpg

    The error on line 1 is Incorrect Package.

    I'm using Netbeans SE edition on Mac OS X 10.8.

    Any Help would be great,

    Tom

    EDIT - Sorry about the bad pic quality?? Alternative link - https://docs.google.com/file/d/0BwF9...it?usp=sharing


  2. #2
    Junior Member
    Join Date
    Jun 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Complete noob! Incorrect package and ' Exception in thread "main" java.lang.NoClassDefFoundError:'

    All fixed now. Not entirely sure what the problem was but at least it's working now. No doubt I'll have many more to come

  3. #3
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Complete noob! Incorrect package and ' Exception in thread "main" java.lang.NoClassDefFoundError:'

    Quote Originally Posted by dathtom View Post
    ...Not entirely sure what the problem was...
    The error on line 1 is Incorrect Package.
    The package declaration is the first statement in the file that basically claims the name of the folder the file is to be found in. No package statement means the default package is used. More on packages

Similar Threads

  1. [SOLVED] Exception in thread "main" java.lang.NoClassDefFoundError
    By cppcppcpp in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 26th, 2012, 11:59 AM
  2. Replies: 3
    Last Post: December 7th, 2011, 02:03 AM
  3. Exception in thread "main" java.lang.NoClassDefFoundError
    By Scarice in forum Java Theory & Questions
    Replies: 25
    Last Post: July 4th, 2011, 10:02 PM
  4. Replies: 13
    Last Post: October 13th, 2010, 11:20 AM
  5. Replies: 1
    Last Post: October 25th, 2009, 11:54 AM