I am using JWNL for getting Wordnet to JRuby.
JWNL has a main class with a static method called “initialize”, which
clashes with Ruby’s initialize.
java_send or java_method (using JRuby 1.4) does not work,
undefined method `java_send’ for Java::NetDidionJwnl::JWNL:Class (NoMethodError)
neither does java_alias:
Jwnl = JavaUtilities.get_proxy_class(‘net.didion.jwnl.JWNL’)
class Jwnl; java_alias :jinitialize, :initialize; end
in `java_alias’: java method not found: net.didion.jwnl.JWNL.initialize()
(the static initialize is also 1-ary)
According to http://www.ruby-forum.com/topic/196176#854971, calling
static methods is not implemented:
This works for all instance methods. I have not implemented it for
static methods…does it seem like I should?
Is there any other way to calling a static method on a Java class?