Link to home
Start Free TrialLog in
Avatar of Zolf
ZolfFlag for United Arab Emirates

asked on

Setup jar to run as service on Ubuntu

Hello there,

Now I have a jar application on my Ubuntu server and is located in /home/steve/deployment/bear.server-1.0-SNAPSHOT-fat.jar and everytime i want to run my application I need to run this cmd
 java -jar bear.server-1.0-SNAPSHOT-fat.jar -conf config.json

Open in new window

. I want to know how I can run this cmd with a shotcut for e.g. run myapp. Please help!!

cheers
Zolf
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

What does bear.server-1.0-SNAPSHOT-fat.jar do? Tanukisoft probably still make their service wrapper. Whether it's been updated to cope with systemd is another issue. If it hasn't, you can write your own systemd service
SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zolf

ASKER

Thanks for all your comments.

David

In your system wide or user shell startup file, you can add...
Can you please elaborate more, I am new to ubuntu world.

CEHJ
What does bear.server-1.0-SNAPSHOT-fat.jar do?
It runs my server side application.

If it hasn't, you can write your own systemd service
Can you please tell me how to setup with reference to my jar file location which is in my home directory
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zolf

ASKER

cheers