Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to run .jar files on Synology

for a Synology NAS DS118 i want to run a jar file and i'm looking for a way to hibernate the program on the synology so that it executes automatically, can anyone help ? i have tried to run the .jar from the ssh client but i think i should first make the jar file executable and i still didn't figure it out...i couldn't find any detailed tutorials yet :( –

like image 206
Yacine Walid Avatar asked Apr 12 '18 12:04

Yacine Walid


1 Answers

You have to installed and updated the Oracle Java package. You have to also enable terminal access to the NAS and navigated to the right directory where the jar file is. I am not aware of your specific package, but i assume since you can start the foo.jar via double click you might also be able to start this foo.jar on your DiskStation like this :

ssh -ladmin YOURDISKSTATIONIP YOUR_ADMINPASSWORD

cd TOYOURJARDIRECTORY

java -jar foo.jar

where foo.jar is the .jar you want to start. You can write a bash service and it gonna be automatized. I hope it will be helpful for you.

To make your java file executable. See this post;

https://stackoverflow.com/a/47209860/5879876

like image 51
Gürkan Çintesun Avatar answered Oct 02 '22 09:10

Gürkan Çintesun