This page is no longer maintained — Please continue to the home page at www.scala-lang.org

JSR 223?

1 reply
Story Henry
Joined: 2010-02-10,
User offline. Last seen 42 years 45 weeks ago.

Hello!

I was just wondering if there is a good JSR-223 (plugin? Jar?) implementation for Scala. This would allow tools such as XWiki to easily make it available for scripting. Apparently if a language implements this, they can provide it just by placing a jar in a special directory. These are the jsr223 languages they support: Velocity, Groovy, Python, Ruby, PHP.

http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting

Yesterday I found http://code.google.com/p/netgents/downloads/list
but I am not sure if it has perhaps been integrated into Scala now, or if there is something that is supported...

A Scala newbie,

Henry

Social Web Architect
http://bblfish.net/

Michael
Joined: 2009-02-23,
User offline. Last seen 20 weeks 2 days ago.
Re: JSR 223?

Story Henry writes:

> I was just wondering if there is a good JSR-223 (plugin? Jar?) implementation
for Scala. This would allow
> tools such as XWiki to easily make it available for scripting. Apparently if a
language implements this,
> they can provide it just by placing a jar in a special directory. These are
the jsr223 languages they
> support: Velocity, Groovy, Python, Ruby, PHP.

Henry,

I created a JSR-223 scripting engine for Apache Sling [1]. While it is used by
Sling and is interoperable with OSGi, it can also be used independently from
Sling and OSGi. The source is available from SVN [2] and there are some
instructions [3] on how to use it though these are mainly targeted to Sling.

Note however, that the scripting engine is different from REPL scripting. It
only accepts 'real' Scala source entities as input. I chose this approach in
order to be able to use existing tools for developing scripts (i.e. editor, IDE,
debugging, unit testing).

Michael

[1] http://sling.apache.org/site/index.html
[2] http://svn.apache.org/repos/asf/sling/trunk/contrib/scripting/scala/script/
[3] http://cwiki.apache.org/confluence/display/SLING/Using+Scala+with+Sling

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland