Lance:
You might also want to look at Apache Sling's scripting support. After
installing a few bundles (I'd need to test to be sure, but my guess is
its probably 3 or 4), you can get a ScriptEngineManager from the OSGi
service registry.

If you have questions about this approach, probably better to post
them on the sling-users mailing list.

Regards,
Justin

On Wed, Oct 19, 2011 at 11:15 AM, Andrei Pozolotin
<andrei.pozolo...@gmail.com> wrote:
> 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
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to