- Using the existing main()
- Bootstrapping from within your application
- Starting through ant (build script)
This document describes how to start the telnetd with the given main() or from within your own application.
For starting up the telnetd and the required number of listeners, you have two choices:
- using the existing main() in the TelnetD class
- instantiating and activating the daemon from within your application.
Either way you will have to provide the appropiate configuration properties as well as shell implementations (see deployment and configuration index).
Using the existing main()
Assemble/prepare the properties that resemble your desired configuration and issue:
java -classpath telnetd.jar:commons-logging.jar:log4j.jar net.wimpi.telnetd.TelnetD -D -Dlog4j.configuration=<your URL for log4j.properties> <your URL for telnetd.properties>
Logically you will need a JRE/JDK installed (1 and above should work) and the java VM binary in your PATH.
Bootstrapping from within your application
It will be required to take the following steps:
- Assemble/prepare the properties that resemble your desired configuration.
- Create a TelnetD instance using one of the given factory methods in the TelnetD class (see API docs).
- Start the daemon calling start()
An example is given below, props represents a single Properties instance containing all properties for your desired configuration:
//1. create singleton instance TelnetD daemon = TelnetD.createTelnetD(props); //2.start serving daemon.start();
Starting through ant (build script)
You can as well use ant to start the daemon invoking ant with the runit target.
by Dieter Wimberger