码迷,mamicode.com
首页 > 系统相关 > 详细

Debian 8下手工安装 Eclipse CDT neon.2

时间:2017-01-27 16:31:47      阅读:1002      评论:0      收藏:0      [点我收藏+]

标签:ons   rod   jdk   cat   logs   4.6   ted   osgi   tar   

  从 http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/neon2 下载 eclipse-cpp-neon-2-linux-gtk-x86_64.tar.gz,解压安装至目录 /opt/,运行 /opt/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 /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /opt/eclipse//plugins/org.eclipse.platform_4.6.2.v20161124-1400/splash.bmp
-launcher /opt/eclipse/eclipse
-name Eclipse
--launcher.library /opt/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.401.v20161122-1740/eclipse_1618.so
-startup /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.appendVmargs
-exitdata f0007
-product org.eclipse.epp.package.cpp.product
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-jar /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar 

 

看起来是需要 java 1.8。

查看java版本:

$ java -version

java version "1.7.0_111"
OpenJDK Runtime Environment (IcedTea 2.6.7) (7u111-2.6.7-2~deb8u1)
OpenJDK 64-Bit Server VM (build 24.111-b01, mixed mode)

查查是哪里的java命令:

$ which java
/usr/bin/java
$ ll /usr/bin/java
lrwxrwxrwx 1 root root 22 Jan 25 01:37 /usr/bin/java -> /etc/alternatives/java
$ ll /etc/alternatives/java
lrwxrwxrwx 1 root root 46 Jan 27 15:36 /etc/alternatives/java -> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java

 

上网搜索/etc/alternatives/java,找到 http://unix.stackexchange.com/questions/100732/i-deleted-etc-alternatives-java,根据其中的说法,执行以下命令以切换至1.8版:

$ sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

本质上它完成的任务是:

ln -s /usr/lib/jvm/jdk1.7.0_45/jre/bin/java /etc/alternatives/java

此时再启动eclipse,运行正常。

Debian 8下手工安装 Eclipse CDT neon.2

标签:ons   rod   jdk   cat   logs   4.6   ted   osgi   tar   

原文地址:http://www.cnblogs.com/xxfcz/p/6353878.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!