网站首页 新闻首页 网页设计图形动画软件编程网站开发办公软件操作系统数据库网络技术认证考试范文资料黑客攻防 书籍教程 进入论坛

java service wrapper 在linux下实现jar用服务启动

http://www.diybl.com/ 2008-1-25  网络 点击:  [ 评论 ]
文章搜索:    点击制作chm打包电子书教程

br />#********************************************************************

# Wrapper Windows Properties

#********************************************************************

# Title to use when running as a console

wrapper.console.title=WebAPFWonline Service     \\看英文 名字


#********************************************************************

# Wrapper Windows NT/2000/XP Service Properties

#********************************************************************

# WARNING - Do not modify any of these properties when an application

#  using this configuration file has been installed as a service.

#  Please uninstall the service before modifying this section.  The

#  service can then be reinstalled.


# Name of the service

wrapper.ntservice.name=Servername  \\服务名


# Display name of the service

wrapper.ntservice.displayname=Servername Service  \\显示的服务名


# Description of the service

wrapper.ntservice.description=Servername Service  \\服务描述


# Service dependencies.  Add dependencies as needed starting from 1

wrapper.ntservice.dependency.1=


# Mode in which the service is installed.  AUTO_START or DEMAND_START

wrapper.ntservice.starttype=AUTO_START     //自动启动


# Allow the service to interact with the desktop.

wrapper.ntservice.interactive=false


把ln   -s   /usr/asc/Servername      /etc/init.d    
注意
(
/usr/asc/Servername一定要全路径,否则是一个复制的是个无效文件)

     /etc/init.d/Appserver     start   这样就可以了 测试了

注意:

如果我把wrapper.java.command=%JAVA_HOME%/bin/java        

写成系统jdk的全路径  /usr/java/jdk/bin/java

那么         /usr/asc路径下       运行       ./Appserver       start       是可以的

其他路径下       运行       service       Appserver       start       也可以运行.  

估计service这个命令   不给他指定JAVA_HOME   可能读不到JAVA_HOME了

这个我也不太清楚

service       Appserver       start 会出现
Unable   to   locate   any   of   the   following   binaries:
    /etc/rc.d/init.d/./wrapper-linux-x86-32
    /etc/rc.d/init.d/./wrapper-linux-x86-64
    /etc/rc.d/init.d/./wrapper  错误

或者无法启动jvm
(service       Appserver      console中提示)





欢迎光临DIY部落,点击这里查看更多文章教程   【点击打包该文章】
如果图片或页面不能正常显示请点击这里 站内搜索:   
上一篇文章:Spring 2.5 中配置 JPA
下一篇文章:我的Java之旅

文章评论

请您留言

 

最新新闻