“bash: jps: command not found”

Open source software supply chain lighting plan, waiting for you>>>

When xcall.sh JPS is running, it will be prompted with an error “bash: JPS: command not found”

Check as follows:

JDK has been installed, the environment variables of JDK have been configured, and there is no problem in executing JPS command on this machine!

terms of settlement:

1. Switch the root user

su root

2. Create symbolic links

The path link target storage location of LN – s JPS

My settings are as follows:

ln -s /opt/module/jdk1.8.0_ 144/bin/jps /usr/local/bin/jps

Attached xcall.sh script:

#! /bin/bash

for i in master slave1 slave2
do
        echo --------- $i ----------
        ssh $i "$*"
done

Grant authority

chmod 777 xcall.sh

Similar Posts: