问题描述
问题是
hduser@saket-K53SM:/usr/local/hadoop$ jps
The program 'jps' can be found in the following packages:
* openjdk-6-jdk
* openjdk-7-jdk
Try: sudo apt-get install <selected package>
我的配置是
hduser@saket-K53SM:/usr/local/hadoop$ java -version
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
设置 conf/hadoop-env.sh
set up conf/hadoop-env.sh
hduser@saket-K53SM:/usr/local/hadoop$ cat conf/hadoop-env.sh | grep JAVA_HOME
# The only required environment variable is JAVA_HOME. All others are
# set JAVA_HOME in this file, so that it is correctly defined on
export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_33/
我知道有一个与此类似的问题 (http://stackoverflow.com/questions/7843422/hadoop-jps-can-not-find-java-installed).但我在这里安装了 Sun jdk.所以任何帮助将不胜感激..
I know there is a question (http://stackoverflow.com/questions/7843422/hadoop-jps-can-not-find-java-installed) similar to this one.But i have installed Sun jdk here. So any help would be appreciated..
推荐答案
这实际上不是 Hadoop 问题.Hadoop 不使用 JPS.
That is actually not a Hadoop problem. Hadoop does not use JPS.
如果找不到 JPS,则必须将其放入路径中或创建别名.JPS 可执行文件可以在 $JAVA_HOME/bin/jps
下找到.
If JPS can't be found, you have to put it into your path or create an alias.The JPS executable can be found under $JAVA_HOME/bin/jps
.
例如别名可以是:
alias jps='/usr/lib/jvm/jdk1.6.0_33/bin/jps'
或者如果你不关心使用 JPS,你可以改为做一个
Or if you don't care about using JPS, you could instead do a
ps aux | grep java
这将大约.给你同样的结果;)
which will approx. give you the same result ;)
这篇关于Hadoop:无法使用 Jps 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!