1

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?

Community
  • 1
  • 1
Jens de Bruijn
  • 939
  • 9
  • 25

1 Answers1

1

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._
atline
  • 28,355
  • 16
  • 77
  • 113