Thread: Trying to get a java program to restart when it crashes
thanks in advance reply. i'm relatively new linux , trying run minecraft server. got server running fine recent pre-release bit unstable. such, crashes often. read that there ways ubuntu run called "bashscript" (i'm guessing it's .bin on ***dows) automatically check if program running, , start program if not running. problem can't make heads or tails of code... can me code out? figured out it's more complicated typing text in terminal unfortunately, follow instructions: create document following code (anywhere on machien) code: #!/bin/bash while true if [ ! `pgrep java` ] ; /usr/bin/minecraft.sh fi sleep 30 done create document in minecraft server folder , title "start server.sh" following code code: cd /home/kenji_03/games/minecraftserver java -xms1g -xmx1g -jar minecraft_server.jar <important> must change...