mpjboot bash: java: command not found

2019-07-23 00:30发布

问题:

java and mpj express are installed in /opt in compute node. JAVA_HOME, MPJ_HOME and PATH are set already via bashrc.

error when running mpjboot machines:

bash: java: command not found

java is working already in both machines

mpjboot:

#!/bin/sh

if [ $# -ne 1 ]; then
  echo "Usage: mpjboot <machines_file>";
  exit 127
fi 

java -jar $MPJ_HOME/lib/daemonmanager.jar -boot -m "$@"

回答1:

which Linux Distribution are you using? Try placing MPJ_HOME and JAVA_HOME at top of .bashrc. It fixes this problem in case of Ubuntu particularly.