tags:

views:

29

answers:

1

I have a JAVA project that updates a database.

But I have to manually run the project so the database becomes updated. And when I forget, it's just a pain in the ass, so my boss comes to me and starts to say a lot of things.

I want to export a .jar file that runs when Windows starts, checks if the database is updated, and, if not, update it.

Is there any way to do that?

+1  A: 

First, if you are not running in a browser, then you don't need an applet.

Then there are two ways to do this:

  • make a .bat file that calls java -jar \path\to\your\jar\file.jar and place it in Start Menu > Programs > Startup (which is actually C:\Documents and Settings\<username>\Start Menu\Programs\Startup
  • install as service (but this is rather complicated)
Bozho