I want run java application though shell script.The below is my demo shell script. nohup java -cp .:$CLASSPATH com.xx.xx.App >> path/to/xx.log &
but get this error: nohup: failed to run command 'java': No such file or directory
someone can solve this question? thx!
I solved this question by add this line to my shell script. source ~/.bashrc
This method is reload system environment. Then shell script can use java command.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.