Missing AbstractScriptEngine

Hi,I am using jruby version 1.1.3 in Mac with JDK 5.0 and the reference
implementation of JSR 223, when I run code to load the
JRubyScriptEngine, I
get the following error:

Exception in thread “main” java.lang.NoClassDefFoundError:
javax/script/AbstractScriptEngine
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at
com.sun.script.jruby.JRubyScriptEngineFactory.getScriptEngine(JRubyScriptEngineFactory.java:134)

It appears that that class is not included in the reference
implementation
available from The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 223. Does anyone know
where I
would be able to get hold of a version of this class that’s been
compiled
for JDK 5?

Thanks in advance,
Tom

Hi,
what do You mean by reference?
I think You use bad jsr engine version, most current is 1.1.3 - if i’m
up to date,
You will have to dig through the jruby web page to find a link for it.

Best greetings,
Pawel Wielgus.

On 28/07/2008, Thomas W. [email protected] wrote:

at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
It appears that that class is not included in the reference implementation
Dubit Limited
+44 1133 947920
www.dubitlimited.com


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Thomas,
just yesterday i’ve downloaded jruby-engine 1.1.4, i use java 6 and
everything works fine. If You won’t succed with 1.1.4 maybe You could
ask author of engine implementation about Your specific issue.

Best greetings,
Pawe³ Wielgus.

Hi,The reference implementation of jsr 223 is a standalone jar that you
can
use to run scripting languages in java 5. It can be downloaded from
The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 223 and contains all the classes that
are
shipped with JDK 6, with the exception of
javax.script.AbstractScriptEngine,
which it appears that the JRuby engine uses (My apologies for not
including
my version number before, I’m using 1.1.3).

I think I downloaded jruby from
http://dist.codehaus.org/jruby/jruby-bin-1.1.3.tar.gz is this the right
location?

Thanks,
Tom

2008/7/29 PaweÅ‚ Wielgus [email protected]

Hi Thomas,

You can use JRuby’s JSR 223 scripting engine on JDK 5, but you need an
archive of JSR 223 API because classes of this API has been included
in JDK 6. In addition, you should download two archives from right
locations. First, download JSR 223 API, which is sjp-1_0-fr-ri.zip,
from The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 223. Second, download JRuby
engine’s archive from
https://scripting.dev.java.net/servlets/ProjectDocumentList?folderID=8848&expandFolder=8848&folderID=0.
Porbably, http://wiki.jruby.org/wiki/Java_Integration and README.txt
included in JRuby engine’s archive will help you to understand how to
get things work fine.

The latest version of JRuby engine is 1.1.4 which works on JRuby
1.1RC3 and later including 1.1.3.

-Yoko

2008/7/30 Thomas W. [email protected]: