-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
7, 8
-
b64
-
solaris_11
Permissions/getLocalHostTest
InetAddress.getLocalHost().getHostAddress() call on solaris 11 always returns loopback address 127.0.0.1.
Tried running the sample program with and without security manager. In both cases, it returns the loopback address. From Java documentation -
--------------------------------------------------------------------------------------------
public static InetAddress getLocalHost()
throws UnknownHostException
Returns the local host.
If there is a security manager, its checkConnect method is called with the local host name and -1 as its arguments to see if the operation is allowed. If the operation is not allowed, an InetAddress representing the loopback address is returned.
Returns:
the IP address of the local host.
--------------------------------------------------------------------------------------------
InetAddress.getLocalHost().getHostAddress() call on solaris 11 always returns loopback address 127.0.0.1.
Tried running the sample program with and without security manager. In both cases, it returns the loopback address. From Java documentation -
--------------------------------------------------------------------------------------------
public static InetAddress getLocalHost()
throws UnknownHostException
Returns the local host.
If there is a security manager, its checkConnect method is called with the local host name and -1 as its arguments to see if the operation is allowed. If the operation is not allowed, an InetAddress representing the loopback address is returned.
Returns:
the IP address of the local host.
--------------------------------------------------------------------------------------------