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)
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.
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
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.
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).