# JRuby and eclipse plugin

**URL:** <https://www.ruby-forum.com/t/jruby-and-eclipse-plugin/166350>\
**Category:** Ruby\
**Created:** [April 24, 2009, 8:27am UTC](https://www.ruby-forum.com/t/jruby-and-eclipse-plugin/166350 "2009-04-24T08:27:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amabdelsalam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/958977/32.png) [@amabdelsalam](https://www.ruby-forum.com/u/amabdelsalam)\
**Post date:** [April 24, 2009, 8:27am UTC](https://www.ruby-forum.com/t/jruby-and-eclipse-plugin/166350/1 "2009-04-24T08:27:17Z")

</div>

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(: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
