如何为Mac OS X编写启动脚本? [英] How can I write a startup script for Mac OS X?

查看:155
本文介绍了如何为Mac OS X编写启动脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用Java创建了一个jar文件,我想让应用程序在系统启动期间自动启动.我发现我必须为此编写一个shell脚本.该shell脚本应该是什么样?要使应用程序在启动时自动启动,我还需要做些其他事情吗?

I have created a jar file in java, and I want to make the application automatically start during system boot up. I found I have to write a shell script for that. What should be that shell script look like? Is there anything else I have to do to make an application automatically start at boot up?

推荐答案

在OS X启动时启动程序的首选方法是创建launchd守护程序,如

The preferred way to launch programs at OS X startup is to create a launchd daemon as explained here.

这篇关于如何为Mac OS X编写启动脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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