2

In preparation for remote debugging I have started (on Mac): java Test -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9000

It is running in a loop.

Is there a simple way to verify that the process is indeed listening on port 9000?

Per Lundberg
  • 2,931
  • 1
  • 29
  • 39
Dima
  • 1,196
  • 2
  • 12
  • 19
  • 1
    Possible duplicate of [Who is listening on a given TCP port on Mac OS X?](https://stackoverflow.com/questions/4421633/who-is-listening-on-a-given-tcp-port-on-mac-os-x) – the8472 Oct 11 '17 at 21:14

2 Answers2

3

Will a console command work for you?

netstat -aln | grep 9000

UPD: Who is listening on a given TCP port on Mac OS X?

eugene-nikolaev
  • 1,230
  • 1
  • 12
  • 21
  • Yes it works. But now I want to be sure that is my JVM who is listening tcp4 0 0 127.0.0.1.9000 *.* LISTEN tcp6 0 0 ::1.9000 – Dima Oct 11 '17 at 20:53
0

Looks like the problem was trivial: "java Test -Xdebug... " instead of "java -XDebug ... Test". Wrong order in the command line. Now I see that the JVM listens!

Dima
  • 1,196
  • 2
  • 12
  • 19