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
Simplest solution is to detach process by using nohup with &:
nohup java -jar myjar.jar packageName.fileNameOfFileWithMainMethod &
to stop process will be possible with kill command
process id could be found by ps -ef | grep packageName.fileNameOfFileWithMainMethod
But if you are developing serious application that is long-running on server you have to deal with initialization system like systemd, upstart or something like that.