Forum: JRuby fully qualified path not possible?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
40c8f707cab5f50878cee873881d6b75?d=identicon&s=25 Roger P. (rogerdpack)
on 2012-06-20 20:18
Should I expect the following to work?

require 'java'
class javax.swing.JFrame

Currently it results in

SyntaxError: (irb):6: syntax error, unexpected ';'

class javax.swing.JFrame; end
        from org/jruby/ `eval'

I guess I'm forced to use "ruby style" syntax like

class javax::swing::JFrame; end

Hirotsugu Asari (Guest)
on 2012-06-20 20:20
(Received via mailing list)
class requires a constant, and "javax.swing.JFrame" doesn't look like
Thomas E Enebo (Guest)
on 2012-06-21 15:55
(Received via mailing list)
however you can do:

class javax::swing::JFrame; end

It is too bad you need to resort to this (I do this quite a bit), but
we are living withing Ruby's syntax.


On Wed, Jun 20, 2012 at 1:19 PM, Hirotsugu Asari <>
blog:   twitter: tom_enebo
This topic is locked and can not be replied to.