I have a .jar
file I want to run all the time on a Debian
server.
Currently I have figured out how to access the server via ssh
on
One simple suggestion would be to run the jar file using Linux's CRON.
This article from unix stack exchange should get you going the correct direction for running a jar file using cron.
Alternatively, this article from mkyong.com is also clear and concise.
For example:
crontab -e
0 * * * * java -jar myjar.jar packageName.fileNameOfFileWithMainMethod
to run the jar file every hour at the top of the hour. Or, to start it once on server startup enter @reboot java -jar myjar.jar packageName.fileNameOfFileWithMainMethod