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

I had Installed Eclipse in /opt/eclipse in Linux Mint 18.2 cinnamon with openjdk-9 (please don't tell me switch over oracle jdk). Whenever I click on Eclipse icon this window shows up:

dlEe0.png

Here is the content of that window:

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

Here is my 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)

Also when I type the same command in /opt/eclipse I get this:

/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)

when I try to open it from terminal I get this:-

$ 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.

解决方案

In the file eclipse.ini remove the line --add-modules=ALL-SYSTEM.

In Java 9 the Java Platform Module System was introduced which encapsulate most internal APIs. The --add-modules=ALL-SYSTEM is a Java 9 virtual machine (VM) argument to make it behave like before Java 9.

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值