[jruby-user] jirb and Netbeans Matisse

0 views
Skip to first unread message

tacio 74610

unread,
Nov 14, 2007, 5:20:35 PM11/14/07
to us...@jruby.codehaus.org
Hi,

I'm new to jruby and I'm writing a GUI application that should have a
jirb console inside. I'm using Netbeans Matisse for laying out the
Swing components. I've looked at org.jruby.demo.IRBConsole and adapted
it to get the JTextPane() from the main Frame but I'm having problems
(see below) to start IRB. Apart from JFrame initialization I simply
have a line with:

JEditorPane text=App.getView().getMainFrame().getJTextPaneIConsole();

instead of:

JEditorPane text = new JTextPane();

I've also tried to start IRB from the same Thread that sets the main
JFrame visible, but it didn't help either.
I mean:
..
Thread t2 = new Thread() {
public void run() {
App.getView().GetMainFrame().setVisible(true);
App.getRubyRunTime().evalScript("require 'irb'; require
'irb/completion'; IRB.start");
}
..

Does anybody know what I might be doing wrong? Ideas?

Thanks in advance,
Tacio

PS:
My system:

- jruby 1.0.2
- java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_02-b05, mixed mode)
- Netbeans Beta 2
- Linux 2.6.20-16-generic #2 SMP Sun Sep 23 18:31:23 UTC 2007 x86_64 GNU/Linux

The Exception I get in
runtime.evalScript("require 'irb'; require 'irb/completion'; IRB.start") :

20:20:58,672 DEBUG [main] showing main window (View.java:49)
Exception in thread "Thread-1"
/path/to/my/project/lib/ruby/1.8/irb/input-method.rb:68:in
`initialize': File not found (Errno::ENOENT)
from /path/to/my/project/lib/ruby/1.8/irb/context.rb:80:in `new'
from /path/to/my/project/lib/ruby/1.8/irb/context.rb:80:in `initialize'
from /path/to/my/project/lib/ruby/1.8/irb.rb:92:in `new'
from /path/to/my/project/lib/ruby/1.8/irb.rb:92:in `initialize'
from /path/to/my/project/lib/ruby/1.8/irb.rb:57:in `new'
from /path/to/my/project/lib/ruby/1.8/irb.rb:57:in `start'
from <script>:1
...internal jruby stack elided...
from org.jruby.Ruby.eval(Ruby.java:278)
from org.jruby.Ruby.evalScript(Ruby.java:271)

---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply all
Reply to author
Forward
0 new messages