Avatar of Zolf
Zolf
Flag 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
LinuxJavaUbuntu

Avatar of undefined
Last Comment
Zolf

8/22/2022 - Mon
CEHJ

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
David Favor

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
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
CEHJ

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Zolf

ASKER
cheers
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck