Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Apple 脚本编辑器上运行命令执行 shell 脚本,我想将其保存并作为应用程序运行,但是在执行它时,我收到一条消息 Permission Denied..?告诉我如何解决它。我在 MacOsx 上所做的一切
命令是:
do shell script "xxx.jar"
当我将它作为脚本运行时,这个命令运行良好。
文件.jar不是 shell 脚本;如果您尝试在文件中运行类.jar,那么只要在文件中正确配置清单,这将起作用.jar:
.jar
do shell script "/usr/bin/java -jar xxx.jar"
您需要在脚本上设置可执行位:
chmod +x /path/to/your/script