windows 7启动时启动tomcat?
我的 Windows 7 机器上安装了 tomcat 7。为了启动它,我必须一直手动启动它。当我重新启动机器时它不会启动。有什么想法如何让 tomcat 在 Windows 7 启动时自动运行,或者在 tomcat 中不可能吗?
I have tomcat 7 installed on my windows 7 machine. To start it, I have to start it manually all the time. It does not start when I reboot my machine. Any ideas how to enable tomcat to run automatically when windows 7 boots up or is that not possible in tomcat?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
(可选)如果您已将 Tomcat 安装为服务,则可以将其配置为在计算机启动时自动启动:“
开始”>“设置>控制面板>管理工具>服务(针对开放服务)
然后:右键单击“Apache Tomcat”>特性
然后:将“启动类型”设置为自动
最终:单击“开始”或重新启动您的电脑
***--> https://wiki.openmrs.org/display/docs/Step +3+-+安装+Tomcat
(Optional) If you've installed Tomcat as a service, you can configure it to start automatically when the computer boots:
Start > Settings > Control Panel > Administrative Tools > Services (for open service)
and then : Right Click "Apache Tomcat" > Properties
and then : Set "Startup Type" to Automatic
final : Click Start or restart your pc
***--> https://wiki.openmrs.org/display/docs/Step+3+-+Install+Tomcat
只需创建一个启动快捷方式,或者,如果您不想登录,请将其作为服务运行。
这是针对 6.0 的,但仍然适用:
http://tomcat.apache.org/tomcat-6.0-doc /windows-service-howto.html
Just make a startup shortcut, or, if you don't want to be logged in, run it as a service.
This is for 6.0, but should still apply:
http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html
我也有同样的问题。修改 Tomcat7.exe 和 Tomcat7w.exe 兼容性属性解决了该问题。转到 C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\(或安装 Tomcat 的任何位置)并打开 Tomcat7.exe 属性。然后转到“兼容性”选项卡、“权限级别”并选中“以管理员身份运行此程序”。对 Tomcat7w.exe 重复此操作,检查 Tomcat7 服务是否设置为在 Windows 启动时运行,然后重新启动计算机。
I had the same problem. Modifying Tomcat7.exe and Tomcat7w.exe compatibility properties solved the problem. Go to C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\ (or wherever you installed Tomcat) and open Tomcat7.exe properties. Then go to Compatibility tab, Privilege Level and check "Run this program as an administrator". Repeat for Tomcat7w.exe, check that Tomcat7 service is set to run on windows startup and reboot your machine.
尝试使用 Java 服务包装器,例如 http://wrapper.tanukisoftware.com/doc/english/ download.jsp(有一个免费的社区版本,一些谷歌搜索应该会找到类似的软件)。
Try a Java Service Wrapper, e.g. http://wrapper.tanukisoftware.com/doc/english/download.jsp (there's a free community edition, and some googling should turn up similar software).
解决了
设置为服务时出现的错误,但使用 bat 文件解决了
解决方案:
创建一个bat文件来启动Tomcat7
将bat文件复制到Windows启动文件夹中(将位于C:\ Users \用户名\ AppData \ Roaming \ Microsoft \ Windows \ Start Menu \ Programs \ Startup中)
它将允许程序在启动时启动Windows 7
Solved it
Got the Errors when setting up as a service, but solved using the bat file
Solution:
create a bat file to Start Tomcat7
copy the bat file in windows Startup folder(will be in C:\Users\userName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup)
it will allow the program to launch upon starting up Windows 7
也许有多种方法或问题导致 tomcat 无法启动。我尝试了很多,但没有成功。最后,我去了“管理员”面板并在那里寻求“服务”。在“服务”中,有所有的服务、服务的状态、描述、启动方式以及用于启动服务的帐户。在那里,我尝试启动 tomcat,我告诉我,该帐户无法执行此操作(尽管我在 tomcat7.exe 的属性中配置了它)。所以我给出了服务的管理员帐户和密码(在服务的属性中登录),然后tomcat能够启动并在我重新启动系统时再次执行此操作。
Maybe there are several ways, or problems, which prevent tomcat from starting. i have tried a lot, but nothing succeeded. In the end, i went to the "Administrator"- Panel and there for "services". In "service", there are all the services, their status, description, the way of starting and the account, which is used to start the service. There, i tried to start tomcat and i told me, that the account was not able to do it (although i configured it in the properties of the tomcat7.exe). So i gave the admin account, password for the service (Logon in the Properties of the service) and then tomcat was able to start and did it again when i rebooted the system.
设置环境变量
JRE_HOME
JAVA_HOME
CATALINA_HOME
CLASSPATH
PATH
然后
将 msvcr71.dll 从 JAVA_HOME/BIN 复制到 CATALINA_HOME/BIN
现在运行startup.bat
set the environment variable
JRE_HOME
JAVA_HOME
CATALINA_HOME
CLASSPATH
PATH
THEN
copy msvcr71.dll from JAVA_HOME/BIN TO CATALINA_HOME/BIN
now run startup.bat