1. Install Java
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installerexport JAVA_HOME=/usr/lib/jvm/java-8-oracle
2. Install Scala and Sbt
sudo apt-get remove scala-library scala
sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb
sudo dpkg -i scala-2.10.4.deb
sudo apt-get update
sudo apt-get install scala
wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.deb
sudo dpkg -i sbt.deb
sudo apt-get update
sudo apt-get install sbt
3. Run a scala program with external config file
$ nohup java -Dconfig.file=application.conf -classpath scala-program.jar com.alvin.ServiceBootStrap
No comments:
Post a Comment