Using swt with jruby

Hey jruby coders, Im trying to test out swt with Jruby, however im
having
trouble grabbing the org.eclipse.swt. Im on Ubuntu Linux, and installed
these packages through synaptic:

libswt-gtk-3.4-java
libswt-gtk-3.4-jni
libswt-gnome-gtk-3.4-jni

In the jirb, I try creating a Display object for instance:
d = org.eclipse.swt.widgets.Display = new.

But it cannot find that package. Ideas on how to set this up?

2009/9/19 Aaron McLeod [email protected]

But it cannot find that package. Ideas on how to set this up?


Aaron McLeod
http://agmprojects.com

Have you done a

require ‘path/to/jar’

for the relevant files? Can you provide more detail on the message that
you
get?

Cheers,

James

Well i looked around through /usr/lib and /usr/bin to see where the
packages
may have installed to specifically, but i couldnt find the swt.jar. So I
unpacked the zip i downloaded initially, and in the jirb typed require
‘path/to/jar’ as you suggested, and it returned true. Was able to create
a
small window using Display and Shell classes. Thanks james :).

Havent touched it in a little while actually, been busy at work. Might
look
into it, as I have a simple chat client thing working with ruby/jruby.
Been
thinking of implementing swt for the GUI.

Is anyone making use of Glimmer? I looked at that last year and would
like
to try it again for JRuby/SWT work. Today I use JRuby as an embedded
scripting language in an eclipse RCP app, but do all the SWT in java.
Would
like to start accessing SWT more directly and Glimmer looks like a nice
option.

Hi Aaron!

How is your exploration of JRuby + SWT going?

We have several systems in production with that setup, so feel free to
ask questions. We are very interested in building a community around
JRuby + SWT for mutual support.

I am usually on #jruby with nick donV.

With kind regards
Uwe K.
Datek Wireless
Norway

Is your own 'framework" available for others to look at?

Hi!

We experienced that when writing JRuby to access SWT/JFace, the amount
of code shrinks so much that a frameworks is less attractive. We have
now gained a bit of experience, and may re-evaluate Glimmer, but most
likely we keep our own “framework” which consists of two modules with
utility methods, one for lo level and one for high level GUI
construction.

Med vennlig hilsen
Uwe K.
Leder
Romerike Jujutsu Klubb
http://jujutsu/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs