I am running a java program from a shell script through Oozie and I get the below error
java: command not found
When I run the shell script from the edge node I do not find any issues and the java class runs without any error and I get the desired output also. However it is the oozie job that fails to run the java command.
All other actions in oozie are executed porperly but when it encounters the java line, it throws the afore said error. I understand that all the nodes in the Hadoop cluster will have Java installed, then why do I get this error?
Below is the java command that I have in my shell script
...
...
java -cp $LOCAL_DIR/libs/integration-tools.jar com.audit.reporting.GenerateExcelReport $LOCAL_DIR/input.txt $LOCAL_DIR/
...
Please provide your thoughts.
java: command not foundgenerally indicates that yourPATHdoes not include the location of thejavacommand. Compareecho "$PATH"in this environment toecho "$PATH"in an environment where the JVM can be successfully invoked. - Charles Duffy/usr/lib/jvm/java8-jre-binor such, and daemons may not have that location (whatever the exact relevant/correct location is) in their PATH. - Charles Duffy