Is there a way to override the default java class loader to log each class that it loads?
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.
精彩评论