Linux start-up script for java application

前端 未结 6 1019
醉梦人生
醉梦人生 2021-01-07 11:31

I have Jar file to run in Linux using this command:

java -jar SyslogAgent_01.jar 192.168.2.154 1998 D:/apachelog.log ApacheLog 13

Can anyon

6条回答
  •  粉色の甜心
    2021-01-07 11:44

    Uhh first you might want to edit out your local ip thats more information that your giving out. Anyhow just open up a new document type this

     #!/bin/bash
    
     #put your commands in here
    

    Save then open up terminal and type chmod +x nameofscript

    Im not sure about ubuntu but on arch we have a place to run commands on startup. My advice is to goto system->prefernces->start up applications or something along that line its in that menu I know.

    Type the path to the script ie /home/username/scrips/myawesomescript

提交回复
热议问题