I followed this Tutorial:
As init.d service
The executable jar has the usual start, stop, restart, and status commands. It will also set up a PID file in the usual /var/run directory and logging in the usual /var/log directory by default.
You just need to symlink your jar into /etc/init.d like so
Assuming that you have a Spring Boot application installed in /var/myapp, to install a Spring Boot application as an init.d service simply create a symlink:
$ sudo ln -s /var/myapp/myapp.jar /etc/init.d/myapp
Then start the Service with:
/etc/init.d/myapp start
When I do this exactly like it is described there, I get following error in the Ubuntu 14.04 console:
ubuntu@spring:/var/myapp$ /etc/init.d/myapp start
-bash: /etc/init.d/myapp: cannot execute binary file: Exec format error