【发布时间】:2010-08-12 10:06:09
【问题描述】:
如果我使用
try {
Class.forName("my.package.Foo");
// it exists on the classpath
} catch(ClassNotFoundException e) {
// it does not exist on the classpath
}
“Foo”的静态初始化块被启动。有没有办法在不启动静态初始化程序的情况下确定类“my.package.Foo”是否在类路径中?
【问题讨论】:
标签: java class classloader