开发者

How do you call the main method of a java class from jruby?

开发者 https://www.devze.com 2023-01-05 03:06 出处:网络
Hi I am using JRuby to interact with a Java class. I have successfully imported the java class into my jruby program and created a new instance. However when I create the instance, I cannot call the m

Hi I am using JRuby to interact with a Java class. I have successfully imported the java class into my jruby program and created a new instance. However when I create the instance, I cannot call the main method. I can call 开发者_开发问答every other method like object.method but I can't do object.main. How do I access the main method of a java class through jruby?


Main is usually static - don't you want ClassName.main?

0

精彩评论

暂无评论...
验证码 换一张
取 消