问题描述
前提:我只能在非常旧的Ubuntu 10.04LTS(又名Lucid Lynx)上工作下载(现在)Oracle最常用的1.8 Java(以及最新的1.8版本:1.8.0_172)后,将其解压缩并正确设置在bash的PATH中.我在$ ECLIPSE_HOME中下载并解压缩了最新的可运行文件(因为Eclipse版本> = Oxygen需要一个我的机器实际上无法在该PC中拥有的较新的gtk库)eclipse:eclipse-java-neon-3-linux-gtk-x86_64.tar.gz当我尝试执行eclipse而不是正在运行的实例时,我收到了该错误对话框消息
Premise:I am constrained to work on a very old Ubuntu 10.04LTS(aka Lucid Lynx)After have downloaded (now) Oracle's most used 1.8 Java(and latest 1.8 release: 1.8.0_172) decompressed it and set it correctly in PATH in bash i downloaded and decompressed in $ECLIPSE_HOME the latest runnable(cause eclipse releases >= Oxygen require a newer gtk library that actually can't have in that PC) eclipse for my machine: eclipse-java-neon-3-linux-gtk-x86_64.tar.gzWhen i tried to execute eclipse instead of a running instance i got that error dialog message
JVM terminated. Exit code=1
/usr/bin/java
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-jar /home/harrykar/Java8/eclipseJavaNeon64//plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /home/harrykar/Java8/eclipseJavaNeon64//plugins/org.eclipse.platform_4.6.3.v20170301-0400/splash.bmp
-launcher /home/harrykar/Java8/eclipseJavaNeon64/eclipse
-name Eclipse
--launcher.library /home/harrykar/Java8/eclipseJavaNeon64//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.401.v20161122-1740/eclipse_1618.so
-startup /home/harrykar/Java8/eclipseJavaNeon64//plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.appendVmargs
-exitdata 6e8037
-product org.eclipse.epp.package.java.product
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-jar /home/harrykar/Java8/eclipseJavaNeon64//plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
有人知道吗?TIA
最好的问候哈里·G·T.卡尔
Best RegardsHarry G.T. Kar
推荐答案
一直以来,我一直专注于在Web上搜索解决方案(但没有运气),并且认为eclipse.ini文件正确无误.eclipse安装后,我的eclipse.ini看起来像这样:
All that time i was focused to search in Web for a solution (but without luck) and not dig into the eclipse.ini file assumed it correct.My eclipse.ini after eclipse installation looked like that:
-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
我在这里注意到错过了实际使用的java(JDK)的路径(别忘了我在主目录中使用了java的自定义安装-而不是/usr/bin/中的Ubuntu系统提供的自定义安装)错误消息正确报告)因此,解决方案只是在eclipse.ini中添加2行(即JDK的自定义路径).
I notice here missed the path to java(JDK) actually in use(don't forget i used a custom installation of java - in my home directory - not that provided from the Ubuntu system in /usr/bin/ as the error message correctly reported)So the solution was simply to add 2 lines in the eclipse.ini(i.e. the custom path to JDK).
请注意,如下所示,在-vmargs之前编写这些行很重要(或者,如果不使用-vmargs,则将其删除)
-vm
/home/harrykar/Java8/jdk1.8.0_172/bin
-vmargs
就这样,日食现在可以按预期运行
And that's it eclipse now works as intended
最好的问候
Harry G.T.卡尔
Harry G.T. Kar
这篇关于全新安装后,eclipse IDE无法启动,但会抱怨的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!