Java 9 Eclipse 4.7 "Export Error" "resource not found", "Could not find the main method from the given startup configuration."

A few days ago I installed Oracle JDK 9. I tried to use Eclipse, but that did not work. I looked around and found this link. So I updated my Eclipse with the link shown after

To try Java 9 support in Eclipse, you can do the following:

by clicking "Help" โ†’ "Install New Software ..." and then paste the link. Everything went well, and I already started coding, and I could start it too.

But I was not able to take the second step, because dragging the Install button did nothing.

(Second step :)

Update the Eclipse 4.7 build for committers using the Eclipse Marketplace entry (a few additional steps are currently required):

Then I realized that I do not have an Eclipse Marketplace client, so I installed it, and then everything went fine.

But here is the problem: When I try to export it as a jar executable, I get this error: "Creating the JAR failed. See Details for more information. No resources selected. Export Jar failed with problems. See Details for more information. . Could not find the main method from the given launch configuration. "

Error Message in Eclipse

I have already tried creating new Launch Configurations, creating a completely new empty project and creating a new workspace. Nothing succeeded.

Is there an idea why this is not working and what can I do to fix it?

EDIT

My eclipse.ini:

-startup plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.500.v20170921-1704 --launcher.defaultAction openFile --launcher.appendVmargs --launcher.defaultAction openFile --launcher.appendVmargs -vm C:/Program Files/Java/jdk-9/bin/javaw.exe -vmargs --add-modules=ALL-SYSTEM -Dosgi.requiredJavaVersion=1.8 -Xms256m -Xmx1024m 
+3
source share
2 answers

As also confirmed in the comments, the problem is filed as BUG # 525711 in Eclipse.

Update : - It was checked as fixed in M20171115-1700, which primarily means that if you use night or national teams released after November 15, 2017, they should be able to create JARs using Eclipse.

=> Although another point that should be noted here is the following: BUG # 527114 to fail when processing multiple modules when creating a JAR.

I would suggest that they are mostly expected to be updated in the future in the Eclipse Photon build in the future.

+3
source

I have a Build id: 20171218-0600 and the problem remains (or again) there.

The original error (525711) was reopened as (526037):

https://bugs.eclipse.org/bugs/show_bug.cgi?id=526037

0
source

Source: https://habr.com/ru/post/1273049/


All Articles