I'm trying to get a .jar file to run at startup on an Ubuntu machine, but I'm not getting anywhere. I've tried the instructions here http://askubuntu.com/questions/99232/how-to-make-a-jar-file-run-on-startup-and-when-you-log-out , and I've tried using info from the Upstart site & cookbook, but they haven't worked. I've tried both the old SysV and the new Upstart approaches, but neither of them start the .jar on system startup.
Here is the shell script which runs the .jar
#!/bin/bash java -jar TransformationServer.jar
The file for the SysV startup approach
#!/bin/bash # Transformation Server # # Description: Transforms incoming messages on a given port and forwards them case $1 in start) /bin/bash /usr/local/bin/ServerStart.sh ;; stop) /bin/bash /usr/local/bin/ServerStop.sh ;; restart) /bin/bash /usr/local/bin/ServerStop.sh /bin/bash /usr/local/bin/ServerStart.sh ;; esac exit 0
# transformationserver - transforms incoming http messages, and redirects them # # This service intercepts incoming http messages on a given port, and # transforms them into an acceptable format in order to be received # by a 3rd party service start on runlevel  stop on runlevel [!2345] respawn script exec /bin/bash /home/ubuntu/TransformationServer/ServerStart.sh # Also trying the below as well #exec /bin/java -jar /home/ubuntu/TransformationServer/TransformationServer.jar end-script
Can someone with more experience in using either of these approaches look over my files here, and potentially point me in the right direction with this? This service is needed so our companies system can successfully receive communications from one of our clients.
Thanks in advance.