Another suggestion for alternative implementation is to use window’s named pipes.
/Staffan On 10 okt 2014, at 12:54, Thomas Stüfe <thomas.stu...@gmail.com> wrote: > Thanks for answering and clarifying the history! > > It seems after reading up on it, that kernel32.dll has a fixed base address > and therefore is always loaded to the same base, system wide. If that is > true, at least handing over addresses to GetProcAddress() etc from injector > to target VM should always work. > > > > > > > On Thu, Oct 9, 2014 at 2:19 PM, Alan Bateman <alan.bate...@oracle.com> wrote: > On 09/10/2014 02:17, Thomas Stüfe wrote: > > : > > I would love to know why we do it this way. I am sure there is a valid reason > for it. Maybe Backward compatibility? > > This was a very typical way for debugging utilities to work at the time. It > was never intended of course to be used to attach to non-HotSpot VMs and also > pre-dates a lot of the security protections and other features that were > subsequently introduced. One thing to know is there wasn't a strict > requirement to be able to attach to JDKs running previous releases so if a > new underlying mechanism is introduced then it shouldn't be a major > compatibility issue. Also as the attach API is pluggable then it would be > possible to have both old and new providers for a time for cases where it was > really necessary to attach to older releases. > > -Alan >