Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I set up jsr223 scripting with scala as scripting language
    primarykey
    data
    text
    <p>So far I have tried the sling implementation for jsr223 scripting for scala, but was not able to get it set up correctly. when I do this:</p> <pre><code>public static void main(String[] args) { try { new ScriptEngineManager().getEngineByName("scala"). eval("object HelloWorld {def main(args: Array[String]) { println(\"Hello, world!\") }}"); } catch (ScriptException e) { e.printStackTrace(); } } </code></pre> <p>I got nothing but:</p> <pre><code>javax.script.ScriptException: ERROR org.apache.sling.scripting.scala.Script line 13 : not found: type Script at org.apache.sling.scripting.scala.ScalaScriptEngine.eval(ScalaScriptEngine.scala:117) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247) </code></pre> <p>similar Problems are discussed here: <a href="http://scala-programming-language.1934581.n4.nabble.com/How-to-compile-Scala-code-from-java-using-the-current-ClassLoader-instead-of-a-string-based-classpat-td1955873.html#a1955873" rel="noreferrer">http://scala-programming-language.1934581.n4.nabble.com/How-to-compile-Scala-code-from-java-using-the-current-ClassLoader-instead-of-a-string-based-classpat-td1955873.html#a1955873</a></p> <p>and </p> <p><a href="http://dev.day.com/discussion-groups/content/lists/sling-dev/2009-12/2009-12-01_Scala_scripting_support_was_Re_And_another_one____Michael_D_rig.html" rel="noreferrer">http://dev.day.com/discussion-groups/content/lists/sling-dev/2009-12/2009-12-01_Scala_scripting_support_was_Re_And_another_one____Michael_D_rig.html</a></p> <p>maybe there is another Implementation that I'm not aware of.</p> <p>Any help appreciated</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload