Java program running in background

background, java, startup

Solution

Follow the these steps to do the job :(Assuming you are using windows and jre is installed )

- First compile your java program and place the class file at one location.

- Now create a bat file and place `java LOCATION TO THAT CLASS FILE/MyProgram` in that.

- Put your bat file in start up programs

- Restart the system, you will get your program running in back ground..! Hope this will help you.

Problem

I have a simple java program which is just a single piece of code that reads from a database and modifies the contents of the database based on certain conditions. Now, what I want is that this program should start automatically at the startup and silently run in the background unless someone kills it from the task manager. I have never done something like this before and don't know exactly how to go about it. Can someone help me out as to how this can be done? Thank you..

Original source

Related problems