(suse) use JRuby with eclipse and glimmer

hi there!

here is my problem : I downloaded eclipse 3.4; then I compiled JRuby
from the subversion directory (it ran well), and I installed the RDT
plugin; at the first launch, eclipse told me it has detected the JRuby
installation : all this is good.
but my aim is to use eclipse, JRuby and glimmer (a project whose goal is
to build easily GUIs) (see
Glimmer - Using Ruby to Build SWT User Interfaces - DZone).
but I don’t see clearly how to make it run all together.

from the archive of glimmer (at the address
https://rubyforge.org/frs/?group_id=4782&release_id=21788), I tried to
run a tic-tac-toe sample, without success :

this file:


Copyright (C) 2007-2008 Nick Malnick and Annas Al Maleh

Licensed under the LGPL. See /COPYING.LGPL for more details.

#require File.dirname(FILE) + “/…/…/src/swt”
require File.dirname(FILE) + “/tic_tac_toe_board”

class TicTacToe

include_package ‘org.eclipse.swt’
include_package ‘org.eclipse.swt.widgets’
include_package ‘org.eclipse.swt.layout’

include Glimmer

def initialize
(…)


causes this error:

tic_tac_toe.rb:10:in method_missing': undefined method include_package’ for TicTacToe:Class (NoMethodError)
from tic_tac_toe.rb:5

and this file:


Copyright (C) 2007-2008 Nick Malnick and Annas Al Maleh

Licensed under the LGPL. See /COPYING.LGPL for more details.

#require File.dirname(FILE) + “/…/…/src/swt”
require File.dirname(FILE) + “/tic_tac_toe_board”

class TicTacToe

include_package ‘org.eclipse.swt’

include_package ‘org.eclipse.swt.widgets’

include_package ‘org.eclipse.swt.layout’

include Glimmer

def initialize
(…)


causes this error:

tic_tac_toe.rb:14:in `const_missing’: uninitialized constant
TicTacToe::Glimmer (NameError)
from tic_tac_toe.rb:5

could you help me to make this sample run (maybe many steps will be
necessary, due to the successive errors that will appear).

thank you for having all read,

olivier.

Better late than never! Haha.

Glimmer DSL for SWT now includes SWT within it so that you do not have to extract yourself from Eclipse in order to use. It also keeps up with the latest releases of Eclipse SWT (e.g. 4.21 since September 2021) and offers detailed setup instructions.

Cheers.