Class.forName使用的类加载器是什么?

pywepe pywepe 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
api上说
Returns the Class object associated with the class or interface with the given string name. Invoking this method is equivalent to:
Class.forName(className, true, currentLoader)

where currentLoader denotes the defining class loader of the current class.

这个currentLoader是哪个loader?

是Thread.currentThread().gettContextClassLoader() 吗?

如果不是那currentLoader是哪个?
...全文
评论 9
收藏 已收藏
分享
返回顶部
pywepe
Java SE 62,621 成员 307,251 内容