Suraj Acharya writes: > I think the problem here is that the "standard connector" for jdb in windows is > shared memory > while it is the socket connector for unix based systems (or solaris at least). This > "standard > connector" is the one jdb uses when invoked with the -attach or -listen options. > > To override this you have to use the -connect option : > > jdb -connect com.sun.jdi.SocketAttach:port=3999 > > > > I don't think JDE provides any easy way of invoking jdb like this. Please correct > me if I'm wrong. > > So to me it looks like the jdb "External Process" sub-menu should look like this: > > > External Process : > Attach to Socket > Attach to Shared Memory > Listen to Socket > Listen to Shared Memory > > > with the following corresponding jdb options[1]: > > jdb -connect com.sun.jdi.SocketAttach:port=... > jdb -connect com.sun.jdi.SharedMemoryAttach:name=... > jdb -connect com.sun.jdi.SocketListen:port=... > jdb -connect com.sun.jdi.SharedMemoryListen:name=... > >
I think you're right. I will fix this problem in the next release along the lines that you suggest. - Paul > Suraj Acharya > > > 1 http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html > > Paul Kinnucan wrote: > > > Philip Varghese writes: > > > Hi > > > > > > > > > > > > Could anyone throw some light on why I get this error when trying to > > > trying to connect to an external application via the Socket - attach > > > option when using jdb in jdee. > > > > > > > > > > > > c:/Main/build-tools/j2sdk1.4.1_01/bin/jdb.exe -attach localhost:3999 > > > > > > > > > > You appear to be trying to attach jdb via a socket to a process that > > is expecting a shared memory connection. > > > > - Paul > > > > > > > > > > java.io.IOException: shmemBase_attach failed, error code = -1 > > > > > > at com.sun.tools.jdi.SharedMemoryTransport.attach0(Native > > > Method) > > > > > > at > > > com.sun.tools.jdi.SharedMemoryTransport.attach(SharedMemoryTransport.jav > > > a:43) > > > > > > at > > > com.sun.tools.jdi.SharedMemoryAttachingConnector.attach(SharedMemoryAtta > > > chingConnector.java:43) > > > > > > at > > > com.sun.tools.example.debug.tty.VMConnection.attachTarget(VMConnection.j > > > ava:346) > > > > > > at > > > com.sun.tools.example.debug.tty.VMConnection.open(VMConnection.java:168) > > > > > > at com.sun.tools.example.debug.tty.Env.init(Env.java:63) > > > > > > at com.sun.tools.example.debug.tty.TTY.main(TTY.java:829) > > > > > > > > > > > > Fatal error: > > > > > > Unable to attach to target VM. > > > > > > Error accessing shared memory, rc = -1 > > > > > > > > > > > > Comint finished > > > > > > > > > > > > > > > > > > > > > > > > Thanks > > > > > > Philip > > > > > > > > > > > > > > >
