Hi guys, Linux noob here
I have a RAspberry Pi with a samsung USB installed. I've got a custom program that is written in Java so it is stored as a .JAR file. Let's call it server.jar
This JAR file is currently residing in this path
/media/pi/SAMSUNG/appli
I created a autostart script in my /home/pi folder
It contains only one line
java -jar /media/pi/Samsung/appli server.jar
^^ I am not sure if the above syntax is correct!
I then went into rc.local as documented and added my script into the text file using nano in sudo. On reboot… nothing happens. Any idea of a way to get my JAR to autostart each time my pi reboots?
/etc/rc.local
should run at the last stage of Linux bootstrap. However it won't send you any error if something goes wrong. First of all it's a shell script so if you want to launch something and put it in background, you need to add&
at the end. Also might be a good idea to actual log something so you know what's going on. For exampleto the
rc.local
file. So if your Java program does not get started you can check the log file.