2010年12月12日日曜日

Windowsでjdb

Windows で jdb 接続したら、下記のエラーが出る。
---
> jdb -attach localhost:8700
java.io.IOException: shmemBase_attach failed: ?w?????t?@?C
at com.sun.tools.jdi.SharedMemoryTransportService.attach0(Native Method)
at com.sun.tools.jdi.SharedMemoryTransportService.attach(SharedMemoryTransportService.java:90)
at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:98)
at com.sun.tools.jdi.SharedMemoryAttachingConnector.attach(SharedMemoryAttachingConnector.java:45)
at com.sun.tools.example.debug.tty.VMConnection.attachTarget(VMConnection.java:358)
at com.sun.tools.example.debug.tty.VMConnection.open(VMConnection.java:168)
at com.sun.tools.example.debug.tty.Env.init(Env.java:64)
at com.sun.tools.example.debug.tty.TTY.main(TTY.java:1010)

致命的エラー:
ターゲット VM に接続できません
---

shared memory transport のコネクタを使って失敗してる?

代わりに socket transport のコネクタを使えば接続できる。

> jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8700