How do I instruct rPi B+ to run java application at boot time in ArchLinux, I mean, where do I add java -jar octopus.jar to execute at boot time?

2 Answers 2


Find a good overview as how to autostart scripts or services at the Archlinux Wiki. A convenient way for simple testing is the use of cron. Edit crontab by crontab -e and use the alias @reboot to schedule a task to be started after reboot. Use full paths for you executables though.

Another typical way is to utilize the systemd default init framework that allows services to be enabled using the systemctl command.


I solved the problem by using this tutorial.

To summarize it, here are the necessary steps:

  1. Create the file for startup service: vi /etc/systemd/system/myservice.service
  2. Fill the created file with the information needed to run AND install your service:
Description=myservice custom script


  1. Save the file
  2. Edit and save the script file /path_to_custom_scripts/myservice_startup_script.sh
  3. Install the service: systemctl enable myservice.service
  4. Check state of the service: systemctl is-enabled myservcice.service

If the service is running, then the service script has been edited without errors and voila, that's it!

  • 2
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Sep 23, 2014 at 8:52
  • 1
    You can edit your own answer to include what you learned, how you used it and what seemed important to you. The answer will be improved and the people that downvoted might revoke that vote too.
    – Ghanima
    Sep 23, 2014 at 9:08
  • First it is not my opinion, but rather a standard set for all of the stackexxchange sites. The rational behind it is to avoid link rot, and keep answers useful despite what may happen to the linked resource. Each down vote counts as -1 so if you see a big drop it is not one person's opinion, but rather the community. If you do as @Ghanima suggested and improve the answer I will remove my down vote - simply add a comment with an @ before my username and I will see it. Sep 23, 2014 at 9:18
  • 1
    @MarkoFrelih On behalf of the community, thank you for sharing your experience :-) I'm sure that will help other people. Oct 3, 2014 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.