Java 9 Eclipse 4.7便携式导出错误“资源未找到”,“无法从给定的启动配置中找到主要方法”。 [英] Java 9 Eclipse 4.7 Portable export error "resource not found", "Could not find main method from given launch configuration."

查看:229
本文介绍了Java 9 Eclipse 4.7便携式导出错误“资源未找到”,“无法从给定的启动配置中找到主要方法”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前我安装了Oracle JDK 9.我尝试使用Eclipse,但它没有用。我环顾四周,找到了



我已经尝试创建新的启动配置,使其完全全新空项目,并创建一个新的工作区。没有什么工作。



有没有人知道为什么这不起作用以及我可以做些什么来解决这个问题?



编辑



我的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


解决方案

同样在评论,问题归档为 BUG#525711



更新 : - 已在 M20171115-1700 中验证已修复,这主要意味着如果一个人在2017年11月15日之后使用nightly或build,他们应该能够使用Eclipse创建JAR。



=>虽然这里需要注意另一点应该是这导致随后的 BUG#527114 在创建JAR时未能处理多个模块。



我猜大多数人都希望在 Eclipse Photon build


A few days ago I installed Oracle JDK 9. I tried to use Eclipse, but it didn't work. I looked around and found this link. So I updated my Eclipse with the link showed after

To try out Java 9 support in Eclipse, you can follow any of these:

by clicking on Help -> Install New Software... and then inserting the link. This went fine and I already could started coding and I could also run it.

But I didn't manage to do the second step, because dragging the Install button did nothing.

(Second step:)

Update your Eclipse 4.7 build for committers using Eclipse Marketplace entry (currently, needs some additional steps):

Then I realised that I didn't have the Eclipse Marketplace Client, so I installed it and then it went fine.

But here is the problem: When I try to Export it as a runnable jar file I get this error: "JAR creation failed. See details for additional information. No resources selected Jar export finished with problems. See details for additional information. Could not find main method from given launch configuration. "

I already tried creating new Launch Configurations, Making a completly new empty project, and creating a new workspace. Nothing did work.

Has anyone an Idea why this doesn't work and what I can do to fix this?

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

解决方案

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

Update:- It has been verified as fixed in M20171115-1700, which primarily means that if one is using nightly or builds released after November 15, 2017 they should be able to create JAR using Eclipse.

=> Though another point to note here shall be that this causes a subsequent BUG#527114 for failure in handling multiple modules while creating the JAR.

I would guess one shall mostly expect these updated in the Eclipse Photon build in future.

这篇关于Java 9 Eclipse 4.7便携式导出错误“资源未找到”,“无法从给定的启动配置中找到主要方法”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆