Skip to content

Instantly share code, notes, and snippets.

@seeker815
Created December 4, 2017 09:22
Show Gist options
  • Save seeker815/7937c487a186ebf0276c0c2c08b0baba to your computer and use it in GitHub Desktop.
Save seeker815/7937c487a186ebf0276c0c2c08b0baba to your computer and use it in GitHub Desktop.
Install Java,Scala and SBT

Install Java,Scala and SBT on Ubuntu 16.04

  • Install Java 8 (default jdk)

    sudo apt-get update

    sudo apt-get install default-jdk

    java -version

    Get the java path for $JAVA_HOME

    sudo update-alternatives --config java

    Add to /etc/environment

    $JAVA_HOME=

    Source the env

    source /etc/environment

  • Install Java 8 (Oracle)

    sudo add-apt-repository ppa:webupd8team/java

    sudo apt-get update

    sudo apt-get install oracle-java8-installer

    java -version

    Get the java path for $JAVA_HOME

    sudo update-alternatives --config java

    Add to /etc/environment

    $JAVA_HOME=

    Source the env

    source /etc/environment

  • Install Scala

    sudo apt-get install scala

    scala (opens up the REPL and shows Scala version)

    println("Hello EarthToMars")

  • Install SBT

    echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823

    sudo apt-get update

    sudo apt-get install sbt

    sbt about

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment