Created
July 9, 2016 12:53
-
-
Save kmader/84a1c746f81e60c82cfc095884f1f985 to your computer and use it in GitHub Desktop.
Nashhorn JS in Notebooks / Scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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