| main | back to summary
|
|---|
| public static void main(String... args) The main entry point.
The command line arguments are parsed and the server is started. If
started successfully, the server will run on a new non-daemon thread,
and this method will return. Otherwise, if the server is not started
successfully, e.g. an error is encountered while parsing the arguments
or an I/O error occurs, the server is not started and this method invokes
System::exit with an appropriate exit code.
If the system property "sun.net.httpserver.maxReqTime" has not been
set by the user, it is set to a value of 5 seconds. This is to prevent
the server from hanging indefinitely, for example in the case of an HTTPS
request.
- Parameters
- args:String[]
the command-line options
- Exceptions
- NullPointerException:
- if
args is null, or if there are any null values in the args array
|