安装adk之后写的第一个java程序没有问题.但是下载eclipse之后运行eclipse之后就会报错,如下:
JVM terminated. Exit code=1
/usr/bin/java
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-jar /home/liming/Documents/eclipse//plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /home/liming/Documents/eclipse//plugins/org.eclipse.platform_4.6.1.v20160907-1200/splash.bmp
-launcher /home/liming/Documents/eclipse/eclipse
-name Eclipse
--launcher.library /home/liming/Documents/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444/eclipse_1617.so
-startup /home/liming/Documents/eclipse//plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
--launcher.appendVmargs
-exitdata 538012
-product org.eclipse.epp.package.android.product
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-jar /home/liming/Documents/eclipse//plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
不知道为什么?
终端的报错信息是这样的:
Unrecognized VM option 'UseStringDeduplication'
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.
PHP中文网2017-04-18 10:22:46
Could it be that the number of eclipse and jdk numbers is wrong? Maybe jdk is 32-bit, but eclipse is 64-bit? Or is it the other way around?
(I am a newbie, so I am very nervous to answer the questions...)
PHP中文网2017-04-18 10:22:46
Is there any answer to this question? All the Java versions I checked online are wrong, but my Java version is 64-bit Java8, and the Eclipse version is neon-eclipse4.6. It is said that the versions should match
Haha, the problem is solved. My java8 was downloaded and installed in 2014, and eclipse-neon is the latest version downloaded today, so java8 needs to be the latest version. Re-download and install the latest version of java8, and the problem is solved.