So, I was trying to make my Java app to run at startup, and I added it to /etc/rc.local. The problem is that the app runs continuously and now the system start just hangs on there. Is there any way to recover from that or did I completely mess it up?

  • 2
    Please do not use obscenities in your posts. Note that other users may have flagged your post as rude or abusive leading to possible rep loss or suspension. Please Be Nice: Avoid vulgar terms and anything sexually suggestive
    – CalvT
    Jun 16, 2017 at 0:49

1 Answer 1


You need to put & after the command. For example, java -jar myapp.jar &

The & detaches the program from the terminal, allowing it to run in the background.

As for recovering from it, try editing it from recovery mode. If that doesn't work, you can use a live USB drive to edit it.

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.