Error message 'java.net.SocketException: socket failed: EACCES (Permission denied)'

I get the error message java.net.SocketException: socket failed: EACCES (Permission denied) when I try to apply the code below. This is the function I call and gives me this exception. public ...