Author Topic: scala install on mac and exit from scala console ครับผม  (Read 4105 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
scala install on mac and exit from scala console ครับผม
« on: มกราคม 19, 2016, 03:40:15 PM »
1. Download scala-X.XX.tgz from the http://www.scala-lang.org/download

2. Unzip the archive and rename a folder in “scala”.
When you browse the scala directory you can find there folders: bin, doc, examples, … etc.

3. Move the scala folder to /usr/local/share/
#cp -rp scala /usr/local/share/.

4. ทำการ export scala path ตาม readme ครับผม
#vi /Users/your_user/.bash_profile
แอดเพิ่ม PATH ดังนี้
export SCALA_HOME=/usr/local/share/scala
export PATH=$SCALA_HOME/bin:$PATH

5. ทำการ run update
$source .bash_profile

เราก็สามารถเข้า console scala ได้ครับตามนี้
$scala

เวลาจะออกจาก console scala ในส่วนของ version 2.10 ขึ้นไป จะออกโดย
scala> sys.exit

 ;)