如何使Eclipse在Linux中找到我的jdk? [英] How to make Eclipse to find my jdk in Linux?
本文介绍了如何使Eclipse在Linux中找到我的jdk?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Java运行时环境(JRE)或Java开发工具包(JDK)
必须可用才能运行Eclipse。在搜索以下位置后,找不到Java虚拟机
:
/ home / $ USER / development / eclipse / jre / bin / java
当前PATH中的java
如何解决这个问题?
Distro:
Ubuntu 12.0.4 64位。
Java:
code> java版本1.6.0_45
Java(TM)SE运行时环境(build 1.6.0_45-b06)
Java HotSpot(TM)64位服务器虚拟机(构建20.45-b01 ,混合模式)
$ JAVA_HOME:
/usr/lib/jvm/jdk1.6.0_45
我的$ PATH包含以下内容:
/usr/lib/jvm/jdk1.6.0_45/bin
感谢您的帮助
解决方案
如果Eclipse没有找到您的JRE / JDK或找到错误的版本,请将以下两行添加到eclipse.ini文件的开头:
-vm
[your-path-to-java-executable]
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
How can I fix this?
Distro:
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:
/usr/lib/jvm/jdk1.6.0_45
My $PATH contains the following:
/usr/lib/jvm/jdk1.6.0_45/bin
Thank you for the help
解决方案
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屋!
查看全文