Run JAR at boot complete

Hi all,

I am using FreePBX 14.0.1.3 version. When PC boot complete, I want to run the JAR file.

For that I had followed below ways, but it was not working,

  1. I had put the command in /etc/rc.local file
    su - root -c “java -jar /home/test/testing.jar”
  1. I had put the command in /etc/rc.local file
    java -jar file.jar &
    exit 0

Suggest me the right way, Thanks in advance !

rc.local should work. You probably need to put the full path to the java command. If you are stuck then check on Stack Overflow / Server Fault sites because this is not really a FreePBX question.

Thanks for your reply and for your information too @billsimon .

I had used the full path( /home/test/testing.jar) also. But its not working…