Setup Development Environment for Scala using Mac

#1

Let us understand how to setup Development environment on Mac.

Click here to avail $10 coupons for our courses on Udemy to learn key technologies such as Spark and Kafka using Scala as programming language.

  • Ensure Java and JDK
  • Install brew
  • Setup sbt using brew
  • Setup and Validate IntelliJ

Ensure Java and JDK

Let us validate whether we have Java and JDK on Mac. If they are not present make sure to install JDK 1.8.

  • We can run commands such as java -version and javac -version to ensure whether JRE and JDK are setup or not.
  • If they are not present Mac will automatically redirect to install java. We need to make sure that JDK 1.8 is installed for now.

Install brew

Here is the video to cover how to setup brew on Mac.

  • brew is package management tool for Mac.
  • We should be able to search, download and install packages.
  • We can also manage services using brew (which might be covered when it is relevant).
  • Go to this linkand run the command after validating ruby on Mac using ruby -v
  • Make sure you install Xcode command line tools when prompted by hitting Enter/Return key.
  • After setting up, validate by running these commands.

Setup sbt using brew

Here are the steps to install sbt using brew.

  • One can run brew search sbt to search for formulae related to sbt.
  • Here is the command to install latest version of brew - brew install sbt

Setup and Validate IntelliJ

Let us understand how to setup IntelliJ on Mac or Ubuntu.

  • Install IntelliJ using brew (Recommended)
    • One can search for brew formulae related to IntelliJ using brew search intellij . GUI tools such as IntelliJ are available as casks.
    • IntelliJ Community Edition can be installed using brew cask install intellij-idea-ce .
  • Alternative Approach (Download and install)
  • Setup Scala from featured plugins
  • Create simple project and validate (this step will take some time for the first time).
0 Likes