<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: oozie/bin/oozie.distro: line 59: java: command not found in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119036#M17259</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/872/rahulpathak109.html" nodeid="872"&gt;@Rahul Pathak&lt;/A&gt; &lt;/P&gt;&lt;P&gt;i added this line into oozie.distro file.  and the console output is java, linke below:   &lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;echo ${JAVA_BIN}&lt;/EM&gt;
java


&lt;/PRE&gt;</description>
    <pubDate>Mon, 01 Feb 2016 14:16:02 GMT</pubDate>
    <dc:creator>Hefei</dc:creator>
    <dc:date>2016-02-01T14:16:02Z</dc:date>
    <item>
      <title>oozie/bin/oozie.distro: line 59: java: command not found</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119034#M17257</link>
      <description>&lt;P&gt;I have an HDP Hadoop Cluster 2.3 where the JAVA_HOME is set to:&lt;/P&gt;&lt;PRE&gt;(cluster etc/profile)
JAVA_HOME=/usr/local/cloud/java/jdk1.8.0_65
PATH=$PATH:$JAVA_HOME/bin
&lt;/PRE&gt;&lt;P&gt;and i checked the oozie and JDK by this way:&lt;/P&gt;&lt;PRE&gt;&amp;gt;java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

&amp;gt;oozie version
Oozie client build version: 4.2.0.2.3.2.0-2950&lt;/PRE&gt;&lt;P&gt;but when i running any oozie command we get an error, e.g. :&lt;/P&gt;&lt;PRE&gt;&amp;gt;oozie job -run -config ./job.properties -oozie {my oozie server url}
/usr/hdp/2.3.2.0-2950/oozie/bin/oozie.distro: line 59: java: command not found&lt;/PRE&gt;&lt;P&gt;and the oozie.distro file content is:&lt;/P&gt;&lt;PRE&gt;  1 #!/bin/bash
  2 #
  3 # Licensed to the Apache Software Foundation (ASF) under one
  4 # or more contributor license agreements.  See the NOTICE file
  5 # distributed with this work for additional information
  6 # regarding copyright ownership.  The ASF licenses this file
  7 # to you under the Apache License, Version 2.0 (the
  8 # "License"); you may not use this file except in compliance
  9 # with the License.  You may obtain a copy of the License at
 10 #
 11 #      &lt;A href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank"&gt;http://www.apache.org/licenses/LICENSE-2.0&lt;/A&gt;
 12 #
 13 # Unless required by applicable law or agreed to in writing, software
 14 # distributed under the License is distributed on an "AS IS" BASIS,
 15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 16 # See the License for the specific language governing permissions and
 17 # limitations under the License.
 18 #
 19 
 20 # resolve links - $0 may be a softlink
 21 PRG="${0}"
 22 
 23 while [ -h "${PRG}" ]; do
 24   ls=`ls -ld "${PRG}"`
 25   link=`expr "$ls" : '.*-&amp;gt; \(.*\)$'`
 26   if expr "$link" : '/.*' &amp;gt; /dev/null; then
 27     PRG="$link"
 28   else
 29     PRG=`dirname "${PRG}"`/"$link"
 30   fi
 31 done
 32 
 33 BASEDIR=`dirname ${PRG}`
 34 BASEDIR=`cd ${BASEDIR}/..;pwd`
 35 
 36 OOZIECPPATH=""
 37 for i in "${BASEDIR}/lib/"*.jar; do
 38   OOZIECPPATH="${OOZIECPPATH}:$i"
 39 done
 40 for i in "${BASEDIR}/libext/"*.jar; do
 41   OOZIECPPATH="${OOZIECPPATH}:$i"
 42 done
 43 
 44 
 45 if test -z ${JAVA_HOME}
 46 then
 47     JAVA_BIN=java
 48 else
 49     JAVA_BIN=${JAVA_HOME}/bin/java
 50 fi
 51 
 52 # Prime OOZIE_CLIENT_OPTS with JAVA_PROPERTIES for backwards compatibility
 53 OOZIE_CLIENT_OPTS="${JAVA_PROPERTIES} ${OOZIE_CLIENT_OPTS}"
 54 
 55 while [[ ${1} =~ ^\-D ]]; do
 56   OOZIE_CLIENT_OPTS="${OOZIE_CLIENT_OPTS} ${1}"
 57   shift
 58 done
 59 ${JAVA_BIN} ${OOZIE_CLIENT_OPTS} -cp ${OOZIECPPATH} org.apache.oozie.cli.OozieCLI "${@}"
&lt;/PRE&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6481i0BBA658D614B85D7/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="oozie.png" title="oozie.png" /&gt;</description>
      <pubDate>Mon, 01 Feb 2016 13:02:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119034#M17257</guid>
      <dc:creator>Hefei</dc:creator>
      <dc:date>2016-02-01T13:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: oozie/bin/oozie.distro: line 59: java: command not found</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119035#M17258</link>
      <description>&lt;P&gt;Edit /usr/hdp/2.3.2.0-2950/oozie/bin/oozie.distro and add below line before line 59 to see what value JAVA_BIN is taking. This may happen if you have updated/reinstalled Java and script is referring to old path.&lt;/P&gt;&lt;PRE&gt;echo ${JAVA_BIN}
&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Feb 2016 13:14:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119035#M17258</guid>
      <dc:creator>rahulpathak109</dc:creator>
      <dc:date>2016-02-01T13:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: oozie/bin/oozie.distro: line 59: java: command not found</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119036#M17259</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/872/rahulpathak109.html" nodeid="872"&gt;@Rahul Pathak&lt;/A&gt; &lt;/P&gt;&lt;P&gt;i added this line into oozie.distro file.  and the console output is java, linke below:   &lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;echo ${JAVA_BIN}&lt;/EM&gt;
java


&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Feb 2016 14:16:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119036#M17259</guid>
      <dc:creator>Hefei</dc:creator>
      <dc:date>2016-02-01T14:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: oozie/bin/oozie.distro: line 59: java: command not found</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119037#M17260</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/872/rahulpathak109.html" nodeid="872"&gt;@Rahul Pathak&lt;/A&gt; &lt;/P&gt;&lt;P&gt;i add JAVA_HOME="" line  into /usr/hdp/2.3.2.0-2950/oozie/bin/oozie.distro. then it works ok.&lt;/P&gt;&lt;P&gt;Thank you for your advice.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 14:48:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119037#M17260</guid>
      <dc:creator>Hefei</dc:creator>
      <dc:date>2016-02-01T14:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: oozie/bin/oozie.distro: line 59: java: command not found</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119038#M17261</link>
      <description>&lt;P&gt;add this line as below into /usr/hdp/2.3.2.0-2950/oozie/bin/oozie.distro, then it works ok.&lt;/P&gt;&lt;P&gt;JAVA_HOME="YOUR_JDK_INSTALLED_PATH"&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 14:50:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/oozie-bin-oozie-distro-line-59-java-command-not-found/m-p/119038#M17261</guid>
      <dc:creator>Hefei</dc:creator>
      <dc:date>2016-02-01T14:50:15Z</dc:date>
    </item>
  </channel>
</rss>

