There is no official way to do this.
However, it is not difficult to rebuild the code and run it on another virtual machine through a Java agent. This, however, will not work as well as you expect, since it is unclear which class the loader should use the shell and how it should interact with the running program.
Rafael winterhalter
source share