0

I'd like to update java classes dynamically at runtime (just like hot deployment) . Is there solution for that ? Thanks

zjffdu
  • 25,496
  • 45
  • 109
  • 159

1 Answers1

0

The way to update a class that has already been loaded by the JVM is bytecode instrumentation. Java instrumentation agents can use methods redefineClasses and retransformClasses of the java.lang.instrument.Instrumentation class. Native agents can use respective functions RedefineClasses and RetransformClasses of the JVMTI API.

Stanislav Lukyanov
  • 2,147
  • 10
  • 20