创建shell脚本以运行Java程序

我使用 shell脚本来运行 Java类.
我的脚本包含
#!/bin/sh
java -jar jobs/job.jar

这些是我尝试运行它的失败.

[root@]#sh testapp.sh
Unable to access jarfile jobs/job.jar

如果我只是在命令行执行此操作,它工作正常

[root@]#java -jar jobs/job.jar

谢谢.

使用JAR文件绝对路径,例如: G. /root/jobs/job.jar.

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...