简体   繁体   中英

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

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通常是静态的-您不想要ClassName.main吗?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM