A
Ahmed Abdelsalam
Hi,...
I have a problem with running a ruby script from inside eclipse plugin.
Simply, I created a ruby a script that calls some java functions from
class inside eclipse plugin. the problem is that the script cannot load
such java plugin, it gives me the following error:
Here is the ruby code:
class Cells < Java::cz.cesnet.meta.jruby.Cells
def initialize
@cells = {'a1' => 'Hello a1'};
end
end
The error:
javax.script.ScriptException: org.jruby.exceptions.RaiseException:
cannot load Java class cz.cesnet.meta.jruby.Cells
at
com.sun.script.jruby.JRubyScriptEngine.evalNode(JRubyScriptEngine.java:456)
at
com.sun.script.jruby.JRubyScriptEngine.eval(JRubyScriptEngine.java:186)
at javax.script.AbstractScriptEngine.eval(Unknown Source)
......
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Caused by: org.jruby.exceptions.RaiseException: cannot load Java class
cz.cesnet.meta.jruby.Cells
at (unknown).(unknown)(/builtin/java/ast.rb:49)
at
(unknown).get_proxy_or_package_under_package(/builtin/javasupport/java.rb:51)
at #<Class:01x661532>.method_missing(<unknown>:1)
at (unknown).(unknown)1)
The strange point is that when removing <
Java::cz.cesnet.meta.jruby.Cells from the above code, the eclipse plugin
gives no errors, I can even add the command
Java::JavaLang::System.out.println("wwwww") and it works. Which means it
can see standard java classes not classes in my eclipse plugin project.
I'm using JRuby 1.2, eclipse 3.3.2
Can anyone help me?
Thanks
Ahmed
I have a problem with running a ruby script from inside eclipse plugin.
Simply, I created a ruby a script that calls some java functions from
class inside eclipse plugin. the problem is that the script cannot load
such java plugin, it gives me the following error:
Here is the ruby code:
class Cells < Java::cz.cesnet.meta.jruby.Cells
def initialize
@cells = {'a1' => 'Hello a1'};
end
end
The error:
javax.script.ScriptException: org.jruby.exceptions.RaiseException:
cannot load Java class cz.cesnet.meta.jruby.Cells
at
com.sun.script.jruby.JRubyScriptEngine.evalNode(JRubyScriptEngine.java:456)
at
com.sun.script.jruby.JRubyScriptEngine.eval(JRubyScriptEngine.java:186)
at javax.script.AbstractScriptEngine.eval(Unknown Source)
......
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Caused by: org.jruby.exceptions.RaiseException: cannot load Java class
cz.cesnet.meta.jruby.Cells
at (unknown).(unknown)(/builtin/java/ast.rb:49)
at
(unknown).get_proxy_or_package_under_package(/builtin/javasupport/java.rb:51)
at #<Class:01x661532>.method_missing(<unknown>:1)
at (unknown).(unknown)1)
The strange point is that when removing <
Java::cz.cesnet.meta.jruby.Cells from the above code, the eclipse plugin
gives no errors, I can even add the command
Java::JavaLang::System.out.println("wwwww") and it works. Which means it
can see standard java classes not classes in my eclipse plugin project.
I'm using JRuby 1.2, eclipse 3.3.2
Can anyone help me?
Thanks
Ahmed