Last Updated: February 25, 2016
·
1.389K
· kamilmichalak

Quick fix for scala interpreter in Fedora 17

When you try to run scala interpreter in BASH on Fedora 17 there is very high probability that it will raise an error

/usr/bin/scala: error: JVM_LIBDIR /usr/lib/jvm-exports/java-1.6.0 does not exist or is not a directory

To fix it just type

sudo sed -i 's/java-1.6.0/java-1.7.0/g' /usr/bin/scala

It'll fix the hardcoded Java version.

When you get an error while launching Scala interpreter like this

/usr/bin/scala: error: JVM_LIBDIR /usr/lib/jvm-exports/java does not exist or is not a directory

use this command to chenge libraries directory

sudo sed -i 's/export JAVA_HOME=\/usr\/lib\/jvm\/java\//export JAVA_HOME=\/usr\/java\/default\//g' /bin/scala