[英]How can I control the Java version used with Ammonite
In my Linux system I have several Java versions installed.在我的 Linux 系统中,我安装了几个 Java 版本。 How can I control the version used to launch an Ammonite script?
如何控制用于启动 Ammonite 脚本的版本?
The amm
executable is a sh script. amm
可执行文件是一个 sh 脚本。 It searches java
in the PATH
.它在
PATH
中搜索java
。 So you can change temporarily your PATH
.所以你可以暂时改变你的
PATH
。 In bash it can be done in this way:在 bash 中可以这样做:
PATH=/path/to/java myscript.sc argument1 argument2 ....
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.