I want to load a Java agent at runtime without Restarting the JVM I know that I can load the agent with the -javaagent argument when starting the JVM but I want to do it at runtime.
I found out that is possible using Sun tools but when I tried to do that in C++ and JNI it doesn't work and it can't find the required Java functions.