If I have two separate uncompiled scala files in the same directory as:
// hello.scala
object hello {
def world() = println("hello world")
}
and:
// do.scala
hello.world()
I get an error when running do.scala:
$ scala do.scala
error: not found: value hello
Instead I have to compile the hello.scala file first and put it on the classpath to get it to work:
$ scalac hello.scala
$ scala -cp hello do.scala
hello world
Is there a way to get one script to call the other uncompiled scala file using the right use of import, package, classpath, the scala command line tool or something else?