java使用sh或是jsvc来做daemon应该是主流

jsvc(1): application to launch java daemon - Linux man page

    jsvc(1) - Linux man page
    Name

    jsvc - application to launch java daemon
    Synopsis

    jsvc [-jvm JVM name] [-classpath path] [-cp path] [-home directory] [-version] [-help] [-?] [-nodetach] [-debug] [-check] [-user user] [-wait waittime] [-stop] [-verbose:class|gc|jni] [-outfile /full/path/to/file] [-errfile /full/path/to/file] [-pidfile /full/path/to/file] [-Dproperty=value] [-Xoption]
    Description

    jsvc executes classfile that implements a Daemon interface.
    Options

    -jvm JVM name

        use a specific Java Virtual Machine.
    -cp/ -classpath directory and zip/jar files
        set search path for service classes and resouces
    -home directory
        set the path of your JDK or JRE installation (or set the JAVA_HOME environment variable)
    -version
        show the current Java environment version (to check correctness of -home and -jvm. Implies -nodetach)
    -help
        show this help page (implies -nodetach)
    -nodetach
        don't detach from parent process and become a daemon
    -debug
        verbosely print debugging information
    -check
        only check service (implies -nodetach)
    -stop
        stop the service using the file given in the -pidfile option
    -wait waittime
        wait up to waittime seconds for the service to start waittime should multiple of 10 (min=10)
    -user user
        user used to run the daemon (defaults to current user)
    -verbose[:class|gc|jni]
        enable verbose output
    -outfile /full/path/to/file
        Location for output from stdout (defaults to /dev/null). Use the value '&2' to simulate '1>&2'
    -errfile /full/path/to/file
        Location for output from stderr (defaults to /dev/null). Use the value '&1' to simulate '2>&1'
    -pidfile /full/path/to/file
        Location for output from the file containing the pid of jsvc (defaults to /var/run/jsvc.pid)
    -D<name>=<value>
        set a Java system property
    -X<option>
        set Virtual Machine specific option

    Author

    JSVC is part of the Jakarta Commons Daemon project. Authors are Jean-Frederic Clere, Remy Maucherat, Yoav Shapira, Bill Barker. JSVC is under the Apache License Version 2.0.
posted on 2012-02-23 00:28  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2012/02/23/2364102.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值