微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Windows – Tomcat 7的service.bat文件丢失

我喜欢使用命令行将Tomcat安装为 Windows服务.应该有service.bat文件为此目的.但是从Tomcat 7.0.37和7.0.39缺少.
我们无法使用Windows安装程序进行嵌入,因此这不是一个选项.

感谢帮助.

你确定你已经下载了正确的包装?

download page最新的Tomcat 7版本(7.0.39在写这个时刻)根据您的需要选择:

> 32位Windows zip
> 64位Windows zip

两个软件包在bin目录中都有service.bat.

另外在download page上阅读了README文件的包装信息.它解释了每个分发包含什么.

UPDATE

从README文件中打包信息(强调我的):

apache-tomcat-[version].zip or .tar.gz
Base distribution. These distributions do not include the Windows service wrapper nor the compiled APR/native library for Windows.

apache-tomcat-[version]-windows-x86.zip
32-bit Windows specific distribution that includes the Windows service wrapper and the compiled APR/native library for use with
32-bit JVMs on both 32 and 64 bit Windows platforms.

apache-tomcat-[version]-windows-x64.zip
64-bit Windows specific distribution that includes the Windows service wrapper and the compiled APR/native library for use with
64-bit JVMs on x64 Windows platforms.

您可能还会发现阅读RUNNING.txt文件(每个发行版都可用).它包含有关安装/配置/运行Apache Tomcat以及Windows和* nix特定说明的重要细节.

Tomcat是一个Java应用程序.所以是跨平台的但是,如果您想/需要使用Windows特定功能(如Windows服务),那么您应该下载Windows特定的分发版.

其他想法

我自己在我的Windows机器上使用“基本分配”(即不是Windows特定的,但是在下载页面上可以使用普通的ZIP文件,在Binary distributions => Core)没有任何问题,因为我不想打扰安装运行安装程序),但只是简单地将发行版解包到所需的目录,并使用相关的config files进行手动配置.安装(只需解压缩)和删除安装(只需删除而不运行任何卸载程序)就变得更加方便,它更便于携带.此外,您还可以在同一台机器上安装多个版本的Tomcat(如果您需要这些版本的某些开发/测试原因).

这是一个非常有用的一步一步的教程,有一些很好的插图和解释:

> How to Install Apache Tomcat 7/8 (on Windows,Mac,Ubuntu) and Get Started with Java Servlet Programming

原文地址:https://www.jb51.cc/windows/371437.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐