Skip to content

Instantly share code, notes, and snippets.

@kmader
Created July 9, 2016 12:53
Show Gist options
  • Save kmader/84a1c746f81e60c82cfc095884f1f985 to your computer and use it in GitHub Desktop.
Save kmader/84a1c746f81e60c82cfc095884f1f985 to your computer and use it in GitHub Desktop.
Nashhorn JS in Notebooks / Scala
classpath.add("de.christophkraemer" % "rhino-script-engine" % "1.1.0") // since it's not in the classpath with notebooks per default
// A simple test to make sure JavaScript is working properly
val factory = new javax.script.ScriptEngineManager()
val engine = factory.getEngineByName("JavaScript")
println(s"Engine Name $engine")
engine.eval("print('Hello, World\\n')")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment