开发者

Is there a way to override the default java class loader to log each class that it loads?

开发者 https://www.devze.com 2023-02-14 19:55 出处:网络
Is there a way to override the default java class loader to log each class that it loads? For example, I\'d like my program to output something like: Loaded class: nameOfClass, it too开发者_开发百科k

Is there a way to override the default java class loader to log each class that it loads?

For example, I'd like my program to output something like: Loaded class: nameOfClass, it too开发者_开发百科k 10ms for each class that it loads.


Use:

java -verbose:class

when running your application. If you need finer control over class-loading process, read about Java agents.

0

精彩评论

暂无评论...
验证码 换一张
取 消