Setting up smile using scala

276 Views Asked by At

I am new to scala and trying to use smile on windows. I am able to use the shell, but unable to run smile from .bat-script. I have written the following:

::#!
@echo off
call scala %0 %*
goto :eof
::!#

println("Hello, Welcome to Scala Script.....!!!!!")

import smile._

I have tried to put the script in all kinds of location, but continously get the following error:

scala> import smile._

:12: error: not found: value smile

import smile._

I am not sure about what the directory structure should be like (i.e. where should I place the .bat-file relative to the downloaded files. Should I use the source files or the compiled version?

1

There are 1 best solutions below

0
On

If scala script need to use thirdparty library, we need do something like:

scala -classpath third_party.jar test.scala

So yourscript may need to be modified as follows:

::#!
@echo off
call scala -classpath your_smile.jar %0 %*
goto :eof
::!#

println("Hello, Welcome to Scala Script.....!!!!!")
import smile._