eclipse cannot run main “error could not find or load main class”2019 Community Moderator ElectionR cannot be resolved - Android error'Must Override a Superclass Method' Errors after importing a project into EclipseEclipse: How to set the main method for a project?“Debug certificate expired” error in Eclipse Android pluginsDoes a “Find in project…” feature exist in Eclipse IDE?Error: Could not find or load main classClean with eclipse but cannot compile Helloworld in terminal (Error: Could not find or load main class)What does “Could not find or load main class” mean?Size of String array passed as argument to main method in EclipseEclipse not finding a main method
Is "cogitate" used appropriately in "I cogitate that success relies on hard work"?
If sound is a longitudinal wave, why can we hear it if our ears aren't aligned with the propagation direction?
Too soon for a plot twist?
How do we create new idioms and use them in a novel?
Are all players supposed to be able to see each others' character sheets?
How can I portion out frozen cookie dough?
What does the Digital Threat scope actually do?
Would those living in a "perfect society" not understand satire
Create chunks from an array
How to install round brake pads
Movie: boy escapes the real world and goes to a fantasy world with big furry trolls
Why is there an extra space when I type "ls" on the Desktop?
How do you make a gun that shoots melee weapons and/or swords?
Was it really inappropriate to write a pull request for the company I interviewed with?
How to educate team mate to take screenshots for bugs with out unwanted stuff
What is Tony Stark injecting into himself in Iron Man 3?
Rationale to prefer local variables over instance variables?
Logistic regression BIC: what's the right N?
Why do we say 'Pairwise Disjoint', rather than 'Disjoint'?
School performs periodic password audits. Is my password compromised?
Short scifi story where reproductive organs are converted to produce "materials", pregnant protagonist is "found fit" to be a mother
Playing a 7-string guitar song on a 6-string guitar
What will happen if my luggage gets delayed?
If nine coins are tossed, what is the probability that the number of heads is even?
eclipse cannot run main “error could not find or load main class”
2019 Community Moderator ElectionR cannot be resolved - Android error'Must Override a Superclass Method' Errors after importing a project into EclipseEclipse: How to set the main method for a project?“Debug certificate expired” error in Eclipse Android pluginsDoes a “Find in project…” feature exist in Eclipse IDE?Error: Could not find or load main classClean with eclipse but cannot compile Helloworld in terminal (Error: Could not find or load main class)What does “Could not find or load main class” mean?Size of String array passed as argument to main method in EclipseEclipse not finding a main method
I am using eclipse oxygen. I already had a java project downloaded, in the folder
Documents/myJavaProjects/MyProject/
I opened eclipse and imported a project. I made the workspace
Documents/myJavaProjects
I opened the Project /MyProject/
The path to Main.java
is
/MyProject/myPackage/Main.java
Main.java
has this:
*/
package myPackage
public class Main improve this answer
Name your Class exactly as the file.java . End your main class and function with ""
edited Mar 6 at 13:40
answered Mar 6 at 13:39
Petros Evangelos TriantafyllisPetros Evangelos Triantafyllis
276
276
add a comment |
OP already did that
– Óscar López
Mar 6 at 13:39
My file isMain.java
. My class isMain
– user2719875
Mar 6 at 13:39
I ended main class with}
. (just didn't show it in my post)
– user2719875
Mar 6 at 13:42
OP already did that
– Óscar López
Mar 6 at 13:39
OP already did that
– Óscar López
Mar 6 at 13:39
My file is
Main.java
. My class is Main
– user2719875
Mar 6 at 13:39
My file is
Main.java
. My class is Main
– user2719875
Mar 6 at 13:39
I ended main class with
}
. (just didn't show it in my post)– user2719875
Mar 6 at 13:42
I ended main class with
}
. (just didn't show it in my post)– user2719875
Mar 6 at 13:42
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55024441%2feclipse-cannot-run-main-error-could-not-find-or-load-main-class%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
OP already did that
– Óscar López
Mar 6 at 13:39
My file is
Main.java
. My class isMain
– user2719875
Mar 6 at 13:39
I ended main class with
}
. (just didn't show it in my post)– user2719875
Mar 6 at 13:42