java - 无法在 Ubuntu 上使用 JDK 9 启动 Eclipse Neon - 退出代码 = 13

标签 java eclipse ubuntu eclipse-neon java-9

我在 64 位 上安装了 Java 9:

$ java -version
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+140)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+140, mixed mode)

$ javac -version
javac 9-ea

我使用 GUI 在 ~/eclipse/jee-neon/eclipse 下的 64 位 上安装了 Eclipse 4.5.0 (JEE Neon) (从 eclipse-inst-linux64.tar.gz 开始):

$ cat eclipse.ini | grep x86_64
/home/user/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444

当我在安装文件夹中运行 eclipse 时,出现一个包含以下错误 的窗口:

JVM terminated. Exit code=13
/usr/lib/jvm/java-9-oracle/bin/java
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-jar /home/user/eclipse/jee-neon/eclipse//plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /home/user/eclipse/jee-neon/eclipse/eclipse
-name Eclipse
--launcher.library /home/user/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444/eclipse_1617.so
-startup /home/user/eclipse/jee-neon/eclipse//plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
--launcher.appendVmargs
-exitdata 1b8012
-product org.eclipse.epp.package.jee.product
-vm /usr/lib/jvm/java-9-oracle/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/

eclipse.ini

-startup
plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
--launcher.library
/home/user/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-9-oracle/bin
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/

编辑:

  • -vm 的值在 eclipse.ini 中的不同行
  • 将路径值更改为 /usr/lib/jvm/java-9-oracle/bin/java 并没有解决任何问题(而且这似乎不是问题,因为在错误消息 /java 已经附加)
  • eclipse.ini 中将 1.8 更改为 1.9(在运行 eclipse 之前)没有解决问题
  • 删除任何重复行 (-Dosgi.requiredJavaVersion=1.8) 没有解决问题
  • 作为 Linux 操作系统 (Ubuntu) - 没有 javaw 可执行文件
  • Eclipse 安装文件夹路径看起来像这样 /home/user/eclipse/jee-neon/eclipse,破折号 (-) 是唯一可能的字符被认为是“特殊的”

我的操作系统是 Ubuntu 16.04,也是 64 位:

$ uname -i
x86_64

最佳答案

问题可能是由这个问题引起的,可以通过以下解决方案解决。

  • 您正在使用最新的 eclipse 版本和不受支持的 Java 版本。
  • 确保您下载了 64 位版本的 Eclipse 以及 64 位版本的 Java 软件(您已经拥有)。
  • -vm 选项及其值(路径)必须位于不同的行中。 该值必须是 Java 的完整绝对或相对路径 可执行文件,而不仅仅是 Java 主目录。 -vm 选项 必须出现在 -vmargs 选项之前,因为之后的所有内容 -vmargs 直接传递给 JVM。
  • 您可能在 eclipse 中有特殊字符,如 #、!、@ 安装目录。也就是说,如果你的eclipse安装 地址包含任何特殊字符,则显示该错误。所以 确保您没有任何特殊字符。

如果都没有解决,那么尝试使用Open-JDK

关于java - 无法在 Ubuntu 上使用 JDK 9 启动 Eclipse Neon - 退出代码 = 13,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41252473/

相关文章:

java - 如何在 OrmLite 中获取表名

java - 在 JAVA 中创建 Web 服务客户端以从 WSDL (w.Eclipse) 访问方法

java - 尝试导入 org.apache 时出现 Eclipse 错误

Ubuntu 提供手动安装软件包作为 debian 存档的替代方案

java - ActiveMQ 消息组消费者跨多个队列选择?

java - 设置 Eclipse 首选项页面的属性值

Java - 创建卡片组类

c - 作为文本文件的版本控制?

python - 当我手动终止特定的 .py 脚本时,如何仍然使用函数?

php - 如何在php中使用memcached(安装在不同的服务器上)