public class CheckStarter {
public void start() throws IOException {
Config myCfgMsg = new Config();
myCfgMsg.setConfigFile("./server/cfg/server.cfg");
String cfgLang = myCfgMsg.getProp("language");
myCfgMsg.setConfigFile("./server/messages/messages." + cfgLang);
System.out.println("JUNM - Java Universal NetWork Monitor - Rel 0.0.2");
System.out.println("-------------------------------------------------");
System.out.println("Info: Gianluca.Garofalo@gmail.com");
System.out.println("-------------------------------------------------");
System.out.println(myCfgMsg.getProp("006"));
try {
Config myCfg = new Config();
myCfg.setConfigFile("./deamon/cfg/checkstarter.cfg");
String cfgPort = myCfg.getProp("porta");
ServerSocket serverSocket = new ServerSocket(Integer.parseInt(cfgPort));
InetAddress indirizzo = serverSocket.getInetAddress();
String server = indirizzo.getHostAddress();
int port = serverSocket.getLocalPort();
System.out.println("Listener Attivo: " + server + " porta: " + port);