public class SystemUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
LOCALHOST
Hostname for this machine used when no name can be found, or when the actual name doesn't matter.
|
Constructor and Description |
---|
SystemUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
checkPortNotUsed(int port)
Check that a given port is not in use.
|
static List<String> |
getCurrentClasspath()
Get the current class path entries.
|
static String |
getLocalHostName()
Get the first hostname available for this machine, or "localhost" if none are available.
|
static String |
getLocalIP()
Looks up the IP number of the local host.
|
public static final String LOCALHOST
public SystemUtils()
public static String getLocalIP()
public static String getLocalHostName()
public static void checkPortNotUsed(int port)
port
- Port to checkIOFailure
- if the port cannot be bound.public static List<String> getCurrentClasspath()
Copyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.