- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Using Interpreter/classpath within JBoss - XPOST
Thu, 2009-02-26, 15:45
Hi,
We're trying to use the Interpreter within JBoss for compiling and running
Scala scripts.
What is the easiest way to tell the Interpreter to use the
Thread.currentThread() classloader
rather than to construct it's own the classpath from the Settings object.
Thanks in advance.
regards
James
> What is the easiest way to tell the Interpreter to use the
> Thread.currentThread() classloader
> rather than to construct it's own the classpath from the Settings object.
There is no direct way to do this. I had the same problem while working on Scala
scripting support for Apache Sling [1, 2]. My solution was to extend the
compiler such that it can be passed an AbstractFile implementation as part of
its classpath. I then implemented the AbstractFile file system abstraction on
top of the OSGi class loader used by Sling [3].
Michael
[1] http://incubator.apache.org/sling/site/index.html
[2] https://issues.apache.org/jira/browse/SLING-549
[3]
http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/scripting/...