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 7 of 7

Thread: Error: Could not find or load main class Program, I need help

  1. #1
    Junior Member
    Join Date
    Aug 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Error: Could not find or load main class Program, I need help

    problem.jpg

    Hi When I try to run my program in Eclipse I receive this statement " Error: Could not find or load main class Program". I don't know what Should i do with this problem. It is my first program, which I try run in Eclipse.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,145
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Error: Could not find or load main class Program, I need help

    Are there any compiler errors? Copy the full text of the error messages and paste it here. If there are no compiler errors, Try running the code in a command prompt. If there are errors, copy the full text of the error messages and paste it here.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Aug 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Error: Could not find or load main class Program, I need help

    problem2.jpg
    I hope that you need this...

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,145
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Error: Could not find or load main class Program, I need help

    Please copy the text and paste it here, not an image. Images are hard to see and text can not be copied from an image when writing a response.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Error: Could not find or load main class Program, I need help

    Notice the red squigglies under Program and String and the boxes along the left margin with the red 'x' in them. Hovering your mouse over any of those items will give you the reasons for the red squigglies red 'x's - error messages. You can even mouse into the message when they come up and then copy them for posting.

    In this specific instance where you've also shown us the Problems view at the bottom, Eclipse is complaining because your project or development environment has not been setup correctly as indicated by the, "Unbound classpath container" message. You can research this further by Googling, but it sounds like you either haven't installed the JDK, the appropriate JDK, or told Eclipse where to find it if you have. Review your Eclipse "getting started" instructions to ensure you've done all that correctly.

  6. #6
    Junior Member
    Join Date
    Aug 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Error: Could not find or load main class Program, I need help

    now I have other problem. Because I reinstalled my JDK and Now I see other statement "The specified JRE installation does not exist" when I try run the program . Could you advice me step by step what I should do?

  7. #7
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Error: Could not find or load main class Program, I need help

    Thread moved.

    Note where you installed the JDK. If you open a command window and type javac -version <return>, what response do you get?

    In Eclipse, select Window, Preferences. In the left-hand browser of the resulting interface, expand Java, and highlight Installed JREs. The JDK you've installed may or may not appear to the right. If the JRE displayed is incorrect, select Add and navigate to where you installed the JDK. Once the root folder of the currently installed JRE is correctly displayed, select it as the default (check mark to the right), then highlight any other JREs shown one at a time and delete them.

    Then return to your project and see if the program will compile and run. If not, return and give us any errors you're getting.

Similar Threads

  1. i get a error Failed to load Main-Class manifest attribute
    By Deepdiddi in forum Object Oriented Programming
    Replies: 0
    Last Post: January 17th, 2014, 08:25 AM
  2. Error: Could not find or load main class
    By ARULARASAN in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 9th, 2013, 03:46 PM
  3. Could not find or load main class
    By user2013 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 9th, 2013, 04:41 PM
  4. Error: Could not find or load main class
    By lijepdan in forum Java Theory & Questions
    Replies: 8
    Last Post: March 22nd, 2013, 04:32 PM
  5. newbie question: Error: Could not find or load main class Java Result: 1
    By ideaman in forum What's Wrong With My Code?
    Replies: 6
    Last Post: January 1st, 2012, 11:40 PM