One of my application tasks is to get the current system date and compares it with a stored date in my database,i want to make a thread that runs once the system starts in order to get the current date, in other words i want my application to work in the background once the system is started, how to do that,thanks.
Share
Take a look at Apache Procrun. Its a Windows executable, that allows you to install / uninstall java programs as Windows services.
Installation of the service goes as follows (from the project site):
After that, you just start/stop the service using:
or using Services view from My Computer.
Your start / stop classes should have
main(String[] args)methods implemented that will handle starting / stopping of your thread.