Lance:

the underlying problem is that
http://download.oracle.com/javase/6/docs/api/javax/script/ScriptEngineManager.html

is using spi
http://download.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#Service%20Provider

which is to be supported soon in osgi (page 145):
http://www.osgi.org/download/osgi-early-draft-2011-09.pdf

in my case, I activate script engine in the osgi host embedder,
http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html

and access it via TCCL
http://njbartlett.name/2010/08/30/osgi-readiness-loading-classes.html

to avoid the issue.

Andrei.

-------- Original Message  --------
Subject: java scripting inside a bundle
From: Lance Frohman <lfroh...@gmail.com>
To: users@felix.apache.org
Date: Wed 19 Oct 2011 10:06:51 AM CDT
> Does anyone have experience using the javax.script scripting inside a
> bundle?
> Normally you can add the jar(s) for any script language (ruby, python, ...)
> to
> the class path, and the scripting is available from
>
> new ScriptEngineManager().getEngineByExtension(extension)
>
> (extension is "rb" for ruby, "py" for python, ...)
> without doing anything else.
>
> but this does not work when the script jars are inside a bundle (in the
> bundle classpath).
>
> Thanks,
> Lance
>
>   

Reply via email to