写成bat 然后加入到启动里面 或者是autoexec.bat 呵呵 这样行不行
解决方案 »
- java静态变量初始化的问题
- 为什么不报空指针而是打印null?
- 如何根据IP获得主机名+主DNS后缀
- 这样的读写文件该如何处理:一个txt文件保存多个学生信息(总共为500个字符,其中姓名10字符,性别2字符等等)
- hibernate 到底精简了什么?
- 简单问题,javac 的搜索路径
- 从DataInputStream的对象读到了图片的二进制数据,但不知道如何处理将其显示出来?
- jbutton在页面中怎么不能识别回车,但能识别空格键?
- 我是新也JAVA的一个菜鸟,急寻师兄师弟共同上路求得真!~
- JAVA 数组问题,TOO easy!
- Java的swing中有没有类似于VB中ListView的控件????
- java中实现word文档的打开
有一个程序是专门把java程序做成服务的。是一个exe文件,加不同的参数。
tomcat的bin下面的tomcat.exe就是这个文件。其实是javaservice.exe。Tomcat is a JSP engine and was the primary reason that JavaService was created. It is a pure Java application that is ideally used as a service, but comes with no native ability to do so. The following example shows how JavaService can be used to run Tomcat 3.1 as an NT service. The ideas shown here apply to using JavaService with any Java application that needs to run as an NT service. {JDK_HOME} is the location of your JDK and {TOMCAT_HOME} is the location of your Tomcat installation.Copy the JavaService.exe file into the{TOMCAT_HOME}\bin directory as tomcat.exe.
Start a command prompt and change to the directory {TOMCAT_HOME}\bin.
Run the following command:
tomcat.exe -install Tomcat
{JDK_HOME}\jre\bin\{hotspot|server|classic}\jvm.dll
-Djava.class.path={TOMCAT_HOME}\bin\bootstrap.jar;{TOMCAT_HOME}\bin\servlet.jar;{JDK_HOME}\lib\tools.jar
-Dcatalina.home={TOMCAT_HOME}
-start org.apache.catalina.startup.Bootstrap
-params start
-stop org.apache.catalina.startup.Bootstrap
-params stop
-out {TOMCAT_HOME}\logs\stdout.log
-err {TOMCAT_HOME}\logs\stderr.log
注:默认安装为服务是马上启动,并且是自动运行的。
前一阵正好做这个,所以知道的多点。