美文网首页
python读取脚本文件

python读取脚本文件

作者: 酥脆海苔饼干 | 来源:发表于2018-09-25 20:07 被阅读0次

1.java程序打包为jar文件;
2.生成一个.sh的文件,将java -jar xxx.jar文件作为内容;
3.python中

import os
os.system("./javajar.sh")

如果出现错误: sh: ./javajar.sh: Permission denied

chmod 777 *.sh  

运行一下就可以啦。

相关文章

网友评论

      本文标题:python读取脚本文件

      本文链接:https://www.haomeiwen.com/subject/tstroftx.html