开发者

root of java installation

开发者 https://www.devze.com 2023-02-05 04:29 出处:网络
am trying to set up apache hadoop in my system. In the procedure page it says \"edit the file conf/hadoop-env.sh to define at least JAVA_HOME to be the root of your Java i开发者_如何学Cnstallation. \"

am trying to set up apache hadoop in my system. In the procedure page it says "edit the file conf/hadoop-env.sh to define at least JAVA_HOME to be the root of your Java i开发者_如何学Cnstallation. "

What does setting "JAVA_HOME" and "root of java partition" actually mean. Does the root mean the place from where java gets loaded(ie, output of "which java" command)??

Am using Fedora 12


JAVA_HOME denotes the installation folder of a JRE or SDK. It contains binaries, libraries and documentation. You can find out the root installation directory by typing

$ which java

The part before the bin/java will typically be your JAVA_HOME.


In my case (Debian) it is: /usr/lib/jvm/java-6-sun, file /usr/bin/java is a symlink to /etc/alternatives/java which is a symlink to /usr/lib/jvm/java-6-sun/jre/bin/java


The path /System/Library/Frameworks/JavaVM.framework/Versions/Some_version_number/Home/ is where mine is on Macbook pro (Lion).

Here is mine: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/

When you type 'which java' a symlink is what is returned, not the actual Java home path that you need. This path should be defined in the file conf/hadoop-env.sh which is in the root of the Hadoop package.

I'm using Hadoop and I ran into this problem. The path that I posted fixed my problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消