[英]How to write the following windows batch script in mac and linux counterparts?
I am trying to launch a Java application using the JRE in the same folder. 我正在尝试使用同一文件夹中的JRE启动Java应用程序。
The windows batch script was as : Windows批处理脚本为:
"jre\bin\javaw.exe" -jar "main.jar";
How would you create a similar double clickable bash script that works on Mac and Linux? 您将如何创建在Mac和Linux上都能使用的类似的可双击bash脚本?
It shouldn't be too different: 它应该没有太大不同:
#!/bin/bash
jre/bin/javaw -jar main.jar
But most Linux distributions do not allow you to run scripts via double click. 但是,大多数Linux发行版不允许您可以通过双击运行的脚本。 You have to open them via Terminal:
您必须通过终端打开它们:
blender ~ $ bash ./script.sh
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.