I recoded my server program to use java.nio and it works fine.
When I try to close socket:
boolean b1 = serverSocket.socket().isBound();
boolean b2 = serverSocket.socket().isClosed();
and check values, b1 is true and b2 is true.
When I run netstat I see that state od port is "LISTENNING"
While I was using "old" IO, closing socket did excatly what I expected (netstat did not list port as Listenning).
How can I "unbind" socket without shuting down JVM?