If you read the Javadoc for the Socket-Implementation it clearly says:
"This method blocks until a datagram is received."
The packet-Objekt you give to the receive method is just a databuffer which waits to be filled with data that should come from the socket but obviously nobody sends data to that socket.
You could set a timeout using the method setSoTimeout() to get an exception when no packet is received on time.