How do you disable lazy class loading/initialization in Sun's JVM?

后端 未结 2 1770
后悔当初
后悔当初 2020-12-03 14:49

By default, Sun\'s JVM both lazily loads classes and lazily initializes (i.e. calls their methods) them. Consider the following class, Clin

2条回答
  •  天涯浪人
    2020-12-03 15:26

    Class.forName("...", true /*initialize*/, getClassLoader());
    

    You were halfways there.

提交回复
热议问题