I am able to compile scala programs using scalac in terminal but I get the warning.
Charless-Macintosh:src Charles$ scalac hello.scala
Charless-Macintosh:src Charles$ scala HelloWorld
No such file or class on classpath: HelloWorld
Is this to do with .profile
on scala. I'm pretty confused as to what is happening. Many thanks
The current directory is typically not in the classpath by default. So you need to give explicitly:
$ scala -cp . HelloWorld
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With