0

I'm trying to configure a preexistent Java project by importing into Eclipse 2019-3 and Java SE 11. By the moment I import the project I'm able to run it as usual: Right-click on the main.java -> Run As -> Java Application.

Although it stops because of some missing libraries, it's still able to find the main class. But as soon as I import the missing jar files stored in a UserLibrary I've created on purpose, I'm not able to run the project any more. If I try run it by clicking on the main.java file it returns me the following message:

Editor does not contains a main type

If I try run it by right-clicking on the project instead, I get a list of all the possible mains I could run the project from, but all of them comes from the libraries and the main I actually need is not present.

List of mains it returns me :

List of mains it returns me

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Possible duplicate of [Error: Selection does not contain a main type](https://stackoverflow.com/questions/16225177/error-selection-does-not-contain-a-main-type) – Amongalen May 30 '19 at 09:18

1 Answers1

0

I found where the problem was. For the ones who might experience a similar issue: basically, it was a problem of compatibility between the version of JRE I was using for the project and one of the third party library I imported in it. Lowering the JRE version down to Java 10 solved the problem.