用于java应用程序的Linux启动脚本 [英] Linux start-up script for java application

查看:164
本文介绍了用于java应用程序的Linux启动脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用此命令在Linux中运行Jar文件:

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

任何人都可以让我知道如何创建脚本并自动实现此过程我们重启电脑的时候?在windows中我们使用服务但是linux怎么样?
你可以提供给我的脚本和步骤,因为我是Linux的新手......

Can anyone let me know how to create script and implement this process automatically while we restart our computer? In windows we use services but how about linux? Can u provide to me the script and step to do that since i am really new in Linux...

Linux:RHat,Ubuntu

Linux : RHat, Ubuntu

谢谢

推荐答案

如果你想将应用程序作为linux守护进程(服务)运行checkout Java Wrapper: http://wrapper.tanukisoftware.com/doc/english/download。 jsp

If you want to run the app as linux daemon (service) checkout Java Wrapper: http://wrapper.tanukisoftware.com/doc/english/download.jsp

检查这个答案(适用于Windows,但对于linux的更改有点):如何将Java应用程序安装为服务

Check this answer too (is for windows, but for linux changes a little bit): How to install a Java application as a service

这篇关于用于java应用程序的Linux启动脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆