What process using what port n
lsof -i tcp:
To list java processes
jcmd -l
To run diagnostics on a running JVM:
jcmd <pid> <cmd>
See a list of commands to run at: https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr006.html