当前位置: 动力学知识库 > 问答 > 编程问答 >

Calling a class's static method in Groovy Console

问题描述:

I have a Groovy class that has no constructor, and contains only static methods. In GroovyConsole, after importing the class and then trying to call a static method of the class, I get a

java.lang.NoClassDefFoundError: Could not initialize class com.boblablob.lawblog.bla.Person

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:274)

at java.security.AccessController.doPrivileged(Native Method)

at ConsoleScript23.run(ConsoleScript23:4)

How can I call a class's static method in Groovy Console?

分享给朋友:
您可能感兴趣的文章:
随机阅读: