该shell文件,在linux中,命令启动正常,能正常输出对应文件夹中的日志
[root@iZwz93b4gvgxj04g2nw0axZ zypx-company-service]# source /home/prog/xianning/部署/reload.sh
nohup: ignoring input and appending output to ‘nohup.out’
nohup: ignoring input and appending output to ‘nohup.out’
nohup: ignoring input and appending output to ‘nohup.out’
nohup: ignoring input and appending output to ‘nohup.out’
[root@iZwz93b4gvgxj04g2nw0axZ zypx-study-service]# nohup: ignoring input and appending output to ‘nohup.out’
nohup: ignoring input and appending output to ‘nohup.out’

然而以JAVA程序调用时,nohup.out日志文件被删除后,没有生成,但是jar包是后台运行的,项目可以访问。
@RequestMapping(value = "/upReload")
public void upReload() throws IOException {
// 重启服务
String commend = "bash /home/prog/xianning/部署/reload.sh";
// 调用cmd
Process exec = Runtime.getRuntime().exec(commend);
}
怎么能在java调用时正常输出日志文件?(shell . ./启动过没有解决)