java -version is not working with SSH -
i trying run java -version on remote linux machine using ssh in following manner-
ssh ravi@192.168.3.90 "java -version" i getting bash: java: command not found. java installed on remote machine , have kept java_home in both file i.e. /etc/profile , ~/.bashrc. can java -version on while running directly on it.
why? objective java version. changes required version of installed java on remote linux machine?
it not java. ssh. when run command using ssh connect remote machine using specific environment. in case using user ravi. believe user not have java in path variable defined in profile script (e.g. .bachrc).
try run ssh ravi@192.168.3.90 "echo $path" , see java not there.
now question want. if want run java use absolute path. if want able run java using command line add java path user account using.
Comments
Post a Comment