The command scalais basically a script that sets the classpath and then runs your code in the Java runtime.
The corresponding line in the scalascript will appear at the end:
exec "${JAVACMD:=java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.emacs="$EMACS" scala.tools.nsc.MainGenericRunner "$@"
java MainGenericRunner. MainGenericRunner , scala Scala. , . .