首页 > 代码库 > adt bundle启动eclipse出错:A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse.

adt bundle启动eclipse出错:A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse.

在ubuntu12.04安装好jdk,然后设置好环境变量,然后继续安装好adt bundle

在终端进入adt bundle下的eclipse启动eclipse时没问题

但是从图形界面进入adt bundle下的eclipse启动eclipse时出错,提示如下:

  A Java Runtime Environment (JRE) or Java Development Kit (JDK)
  must be available in order to run Eclipse. No Java virtual machine
  was found after searching the following locations:
  /home/czm/adt-bundle-linux-x86_64-20140702/eclipse/jre/bin/java
  java in your current PATH

  

原因是:

  安装jdk时,在配置文件中设置的环境变量,只在当你也是从终端启动eclipse时有效,而当你从图形界面启动elipse时无效,所以系统如上提示JRE或JDK或JVM无效。

最简单的解决办法:

  从终端进入adt bundle下的eclipse目录下新建一个jre目录,然后在创建一个软链接指向jdk目录下的bin目录即可:

    cd 你的eclipse目录

    mkdir jre

    cd jre

    ln -s 你的jdk目录/bin

adt bundle启动eclipse出错:A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse.