0

After running

cs install scala

scala stopped working on my computer

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?

yarchik
  • 336
  • 1
  • 8
  • Have you tried using the path with a double quoote or an escape char like "\" – Ramachandran.A.G Jun 11 '22 at 13:49
  • @Ramachandran.A.G sure, here is the relevant line in my .bashrc file `export JAVA_HOME='/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home'` – yarchik Jun 11 '22 at 14:04
  • 1
    have you tried export JAVA_HOME='/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home' – Ramachandran.A.G Jun 11 '22 at 14:11
  • 1
    @Ramachandran.A.G Amazing, it worked! Can you please post it as an answer together with short explanation on the possible reasons, especially because of the contrast to the following post https://stackoverflow.com/a/57009614/4954079 – yarchik Jun 11 '22 at 14:18

1 Answers1

1

The escape path for the bashrc in case of spaces is a backslash

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!

Ramachandran.A.G
  • 4,788
  • 1
  • 12
  • 24