You are essentially wanting to write a debugger.
Java has a built-in debugging facility, called JPDA. However, normally the debugged process needs to be started with options that allow the debugger to attach. If you can do this, great.
The JMap program can attach to a running process. I haven't looked at it very deeply, but it appears that there is a way to load a debugging agent into that process through classes in the Sun Tools JAR. Of course, that only works with a Sun/Oracle JVM (or OpenJDK).
The third option is to step outside of the JVM altogether, and use a tool like gdb. To take this route, you'll need to understand the JVM implementation. I'm not sure how much debugging information is left in the distributed executable, but you might be able to identify an entry point once you're sufficiently familiar with the build.
Of course, the OS will enforce access rules, so if the process-to-be-hacked is running as another user and you're not the superuser, you're out of luck.