title: Install scala to Apple Silicon
body: <p>I am trying to install scala in MacBook with M1 chips. I have had Zulus javaJDK 15.0.2 installed. I have previously used this page to install home-brew: <a href="https://stackoverflow.com/questions/65487249/getting-a-warning-when-installing-homebrew-on-macos-big-sur-m1-chip">Getting a warning when installing homebrew on MacOS Big Sur (M1 chip)</a></p>
  <p>But when installing scala by <code>brew install scala</code>, I get the following message:</p>
  <p>Error: Failed applying an ad-hoc signature to /opt/homebrew/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/MacOS/libjli.dylib:
  /opt/homebrew/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/MacOS/libjli.dylib: replacing existing signature
  /opt/homebrew/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/MacOS/libjli.dylib: resource fork, Finder information, or similar detritus not allowed</p>
  <p>==&gt; Caveats
  ...
  ...
  If you need to have openjdk first in your PATH, run:
  echo 'export PATH=&quot;/opt/homebrew/opt/openjdk/bin:$PATH&quot;' &gt;&gt; ~/.zshrc</p>
  <p>For compilers to find openjdk you may need to set:
  export CPPFLAGS=&quot;-I/opt/homebrew/opt/openjdk/include&quot;</p>
  <p>For the system Java wrappers to find this JDK, symlink it with
  sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk</p>
  <p><a href="https://i.stack.imgur.com/FBUiQ.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  <p>Despite of this message, I can already run scala script from vscode. So should I worry about the path issue in the message above ? Thanks !</p>