Error: Could not find or load main class [message #1403774] |
Sat, 26 July 2014 14:35  |
Eclipse User |
|
|
|
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 12:33   |
Eclipse User |
|
|
|
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 10:48  |
Eclipse User |
|
|
|
"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.
|
|
|
Powered by
FUDForum. Page generated in 0.11529 seconds