• Post Reply Bookmark Topic Watch Topic
  • New Topic

Instrumenting Core Java Classes  RSS feed

 
P Goel
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Presently I'm working in a project where I'm supposed to instrument java classes for logging purpose. I've used java.lang.instrument package and successfully instrumented all classes except those which are loaded by bootstrap loader.
As specified in the documentation, such classes can also be instrumented by using redefineClasses() api of java.lang.instrument.Instrumentation class. I've tried this api but not being able to modify the methods of preloaded classes (eg. String, Vector).
If any one has some idea of how to do it then please reply.

Thanks in advance,
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!