Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Error: Could not find or load main class(I could not get my eclipse to run)
Error: Could not find or load main class [message #1403774] Sat, 26 July 2014 18:35 Go to next message
Blake Bottum is currently offline Blake BottumFriend
Messages: 1
Registered: July 2014
Junior Member
So I downloaded eclipse and made a simple code to test it out in. When I ran it, first it said, there is no recent launch history, then it said, Error: Could not find or load main class, in the console. Im using a Macbook air with mac osx, on a 64 bit computer. Can anyone help?
Re: Error: Could not find or load main class [message #1403797 is a reply to message #1403774] Sun, 27 July 2014 16:33 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 07/27/2014 10:10 AM, Blake Bottum wrote:
> So I downloaded eclipse and made a simple code to test it out in. When I
> ran it, first it said, there is no recent launch history, then it said,
> Error: Could not find or load main class, in the console. Im using a
> Macbook air with mac osx, on a 64 bit computer. Can anyone help?


It may be that in your sample code, you do not have precisely this method:

public void main( String[] args )

Once you've got that method, right-click the file it's in and choose Run
As... or Debug As...
Re: Error: Could not find or load main class [message #1403913 is a reply to message #1403774] Mon, 28 July 2014 14:48 Go to previous message
James Hackney is currently offline James HackneyFriend
Messages: 3
Registered: July 2014
Junior Member
"So I downloaded eclipse and made a simple code to test it out in. When I ran it, first it said, there is no recent launch history, then it said, Error: Could not find or load main class, in the console. Im using a Macbook air with mac osx, on a 64 bit computer. Can anyone help?"

Make sure you type main instead of Main. Coming from C#, in which the first letter of a Method is capitalized, I had the same exact problem when I first started coding in Java using Eclipse.
Previous Topic:Installing Maven plugin for Eclipse
Next Topic:Having issue removing code preview bar (or called something else) from PyDev editor in eclipse.
Goto Forum:
  


Current Time: Thu Apr 25 07:37:41 GMT 2024

Powered by FUDForum. Page generated in 0.08441 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top