I have a Java executable program that I can run by typing
java -jar abc.jar in terminal.
How can I run it as a service? I want to run it as a service like by typing
service abc start.
You need to create an upstart. http://upstart.ubuntu.com/getting-started.html
Upstart is (IMHO) a disaster compared to good ol' SysV init scripts. Upstart is FAR more effort with little upside to the added work. With that said, I suspect there will be a few upstart defenders out there that will take me to task for me stating the obvious ;-)
I can give you some best alternative than that, that is using alias. Its rather easier than doing
you can simply call it everytime when ever you want with
then at the end type a line as
Then save and close the file.
Then restart the bash with
Now if you type abc in your terminal automatically it will access the jar file you have given.