ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

Eclipse不会在Linux Mint中打开,Java也不会在不同的目录中打开

2019-08-28 09:01:42  阅读:208  来源: 互联网

标签:java linux eclipse openjdk


我已经使用openjdk-9在Linux Mint 18.2肉桂中的/ opt / eclipse中安装了Eclipse(请不要告诉我切换oracle jdk).每当我点击Eclipse图标时,此窗口都会显示:

windows

这是该窗口的内容:

JVM terminated. Exit code=1
/usr/bin/java
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
-jar /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /opt/eclipse//plugins/org.eclipse.epp.package.common_4.7.1.20171005-1200/splash.bmp
-launcher /opt/eclipse/eclipse
-name Eclipse
--launcher.library /opt/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.550.v20170928-1359/eclipse_1629.so
-startup /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.appendVmargs
-exitdata 828016
-product org.eclipse.epp.package.java.product
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
-jar /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar 

这是我的Java:

$java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)

另外当我在/ opt / eclipse中输入相同的命令时,我得到了这个:

/opt/eclipse $java -version
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
    at java.lang.System.initProperties(java.base/Native Method)
    at java.lang.System.initPhase1(java.base/System.java:1850)

当我尝试从终端打开它时我得到这个: –

$eclipse 
Unrecognized option: --add-modules=ALL-SYSTEM
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

解决方法:

在文件eclipse.ini中删除行–add-modules = ALL-SYSTEM.

在Java 9中引入了Java Platform Module System,它封装了大多数内部API. –add-modules = ALL-SYSTEM是一个Java 9虚拟机(VM)参数,使其行为与Java 9之前的行为相同.

JEP 261: Module System

As a further special case at run time, if is ALL-SYSTEM then
all system modules are added to the root set, whether or not they are
in the default set. This is sometimes needed by test harnesses. This
option will cause many modules to be resolved; in general, ALL-DEFAULT
should be preferred.

标签:java,linux,eclipse,openjdk
来源: https://codeday.me/bug/20190828/1749999.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有