Alexander Tolstikhin
Alexander Tolstikhin

Reputation: 13

View class bytecode at runtime

I have patching class dynamycly by BCEL, and them I dynamycly reload class. I`m not sure what I really reloading class.

How can I check it?

How can I view class bytecode without save it as file?

Thanks.

Upvotes: 0

Views: 169

Answers (1)

Stephen C
Stephen C

Reputation: 719386

I'm not sure what I am really reloading the class. How can I check it?

Well, you could print a message to System.out in static initializer in your class. If the message is printed you will know that your class has been reloaded, and the (new) class has been initialized.

How can I view class bytecode without save it as file?

See Pretty printing a method in ASM Bytecode

Whether netbeans special instruments for it?

I don't know what you are asking here ...

Upvotes: 0

Related Questions