vished
Posts: 17
Joined: Fri Apr 01, 2016 9:31 am

Create Windows Service - where can I got error messages?

Dear all,

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);
	}

}
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Create Windows Service - where can I got error messages?

Hi,

I'm not sure why the service does not work correctly when installed with Advanced Installer, please make sure that you configured it correctly.

You can create a verbose log of the installation to see if you get any install error, but as long as the package installation finishes successfully, there may be some service runtime errors, not install-time errors. So you can try to write your service, so that it will create a log file where runtime errors will be written.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”