简体   繁体   English

JAVA_HOME 的路径不正确

[英]Incorrect path to JAVA_HOME

After running运行后

cs install scala

scala stopped working on my computer scala 停止在我的电脑上工作

Coursier/bin/scala: line 26: /Library/Internet: No such file or directory

Not a surprise because并不意外,因为

echo $JAVA_HOME 
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

How can I fix the installation?如何修复安装?

The escape path for the bashrc in case of spaces is a backslash如果有空格,bashrc 的转义路径是反斜杠

export JAVA_HOME='/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home'

Having the backslash negates the space issue that is shown in the execute in the command earlier.使用反斜杠可以消除前面命令中的执行中显示的空格问题。 It might probably work in the shell with a double-quote (as opposed to the single-quote) , the slash escape seems to work in most cases though!它可能在带有双引号(而不是单引号)的 shell 中工作,但斜线转义似乎在大多数情况下都有效!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM