Fully qualified path not possible?

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/RubyKernel.java:1088:in `eval’

I guess I’m forced to use “ruby style” syntax like

class javax::swing::JFrame; end


class requires a constant, and “javax.swing.JFrame” doesn’t look like

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 A. [email protected]

blog: http://blog.enebo.com twitter: tom_enebo
mail: [email protected]