Reply to comment

kobit's picture

Thank you for pointing me

Thank you for pointing me out to the article. Interesting reading indeed.

I had two problems with running Sala script within the Scala JSR-223 for Java:

  1. One which I described already: it requires variables bindings in a different format than JSR-223 for all other scripting languages: "variable name:variable type". Normally you just provide a variable name for all other languages. This is a minor issue because I could just add one more 'if' and put variables for scala script in a different format. But still some inconvenience.
  2. Another more serious problem was that the script just couldn't use any of the variables I have provided. So basically it worked fine as long as I didn't try to exchange any data. Simple 'println "Hello Workd!"' worked ok. This is actually a serious problem because if the script can't exchange any data between the Java environment and the script it is not very useful and it's application is very limited. This might be just my lack of knowledge and lack of any documentation and examples. It might work but after a few hours spent on searching for JSR-223 support and trying to get the script working on the same level as other languages worked I had to give up.

That said I would love to have Scala support if you can help me with getting this working I can provide you with all my examples, files and code and I am also happy to work with you to adjust the Tigase server to make it working. As long as we can stay within JSR-223.

Reply

The content of this field is kept private and will not be shown publicly.