I´m trying to create a Windows Service.
After the installation I can find the WIndows Service but it seems it doesn´t work correct.
How can I got any error message?
If I execute the code from Eclipse it works correct.
Here my code:
Code: Select all
public class WindowsService {
private final static Server server = null;
/**
* @param args
* the command line arguments
* @throws IOException
* @throws InterruptedException
*/
public static void main(String[] argv) throws InterruptedException,
IOException {
try {
// Start database
Functionality.startDatabaseServer();
// Start application server
Functionality.startApplicationServer(server);
}
catch (Exception e) {
e.printStackTrace();
}
}
/**
* Service stoppen
* @throws Exception
*/
public static void stop() throws Exception {
Functionality.stopDatabaseServer();
Functionality.stopApplicationServer(server);
}
}
FOLLOW US
Get the latest news in Application Packaging