Scala's policy is analogous to Java's.
/** Against my better judgment, giving in to martin here and allowing
* CLASSPATH to be used automatically. So for the user-specified part
* of the classpath:
*
* - If -classpath or -cp is given, it is that
* - Otherwise, if CLASSPATH is set, it is that
* - If neither of those, then "." is used.
*/
def userClassPath = (
if (!settings.classpath.isDefault)
settings.classpath.value
else sys.env.getOrElse("CLASSPATH", ".")
)
// Loosely based on the draft specification at:
//
https://wiki.scala-lang.org/display/SIW/Classpath