Eclipse如何在Linux中找到JDK? [英] How can Eclipse find JDK in Linux?
本文介绍了Eclipse如何在Linux中找到JDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经手动安装了Eclipse和jdk。我的JAVA_HOME已设置,并且能够运行 java -version 和 javac -version 命令,但是当我尝试运行Eclipse时,它显示以下消息: / p>
I've installed Eclipse and jdk manually. My JAVA_HOME is set, and I am able to run the java -version and javac -version commands, but when I try to run Eclipse, it shows the following message:
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/$USER/development/eclipse/jre/bin/java
java in your current PATH
我该如何解决?
发行版:
Ubuntu 12.0.4 64 bits.
Java:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
$ JAVA_HOME:
$JAVA_HOME:
/usr/lib/jvm/jdk1.6.0_45
我的$ PATH包含以下内容:
My $PATH contains the following:
/usr/lib/jvm/jdk1.6.0_45/bin
谢谢您的帮助
推荐答案
如果Eclipse找不到您的JRE / JDK或找到错误的版本,请在eclipse.ini文件的开头添加以下两行:
If Eclipse isn't finding your JRE/JDK or finding the wrong version, add the following two lines to the begining of your eclipse.ini file:
-vm
[your-path-to-java-executable]
这篇关于Eclipse如何在Linux中找到JDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文