起動時に「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

おすすめ記事