시작 시 "java -jar file.jar"이 실행되도록 합니다.

시작 시 "java -jar file.jar"이 실행되도록 합니다.

안녕하세요, 저는 kubuntu 13.10 배포판을 실행하고 있습니다. 하지만 제 질문은 매우 일반적인 것 같습니다... 시스템 시작 시 백그라운드에서 .jar을 어떻게 실행합니까?

답변1

명령을 파일에 넣을 수 있습니다 /etc/rc.local.

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

java -jar file.jar &

exit 0

관련 정보