Java Tomcat:startup.bat 丢失

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19559371/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 18:19:54  来源:igfitidea点击:

Tomcat: startup.bat is missing

javawindowstomcatbatch-file

提问by

In many materials about tomcat what I've looked I saw that authors uses exeternal batch script for start and stop tomcat.

在许多关于 tomcat 的材料中,我看到作者使用外部批处理脚本来启动和停止 tomcat。

I didn't see information about wrting this script. I think this script provided by tomcat.

我没有看到有关编写此脚本的信息。我认为这个脚本是由tomcat提供的。

I used exe file for installing my tomcat 7 on my windows 7. In tomcat directory I search startup.bat. This file is missed.

我使用 exe 文件在我的 Windows 7 上安装我的 tomcat 7。在 tomcat 目录中我搜索 startup.bat。丢失了这个文件。

Can you help me?

你能帮助我吗?

采纳答案by bsiamionau

It should be in the /bindirectory. If you're missing this file possibly it means that you have installed Tomcat using Windows Installer. Try to downloadappropriate .zip archive, I believe that you will find startup script there.

它应该在/bin目录中。如果您缺少此文件,则可能意味着您已使用 Windows Installer 安装了 Tomcat。尝试下载适当的 .zip 存档,我相信您会在那里找到启动脚本。

回答by Antoniossss

Have you checked bindirectory under Tomcat instalation dir? It should containt *.bat for start and stop server etc.

您是否检查过binTomcat安装目录下的目录?它应该包含用于启动和停止服务器等的 *.bat。

回答by Raúl

Though it would be everywhere, still if you download the zip from their site, you can follow these instructions - http://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html

虽然它无处不在,但如果您从他们的网站下载 zip,您仍然可以按照这些说明进行操作 - http://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html

bin\startup.bat is for windows & .sh is for Unix.

bin\startup.bat 适用于 Windows,.sh 适用于 Unix。

回答by JonnyRaa

I was puzzled by this - windows people need to script too!

我对此感到困惑 - Windows 人员也需要编写脚本!

However I think it is because tomcat gets installed as a service with a manager. If you want to start and stop it without using the manager you start and stop the service directly.

但是我认为这是因为 tomcat 被安装为管理器的服务。如果你想在不使用管理器的情况下启动和停止它,你可以直接启动和停止服务。

You can do this by typing (in an admin command prompt)

您可以通过键入(在管理员命令提示符中)来执行此操作

net start tomcat7

and

net stop tomcat7

回答by Sidrah

If you want to start Tomcat server by using startup.bat and you are unable to find it(that's because installer does not have it, you can only see it if you download and run .zip this will show startup.bat explicitly https://www.screencast.com/t/RMPCq5eJre3), So to solve the issue just go to C:\Program Files\Apache Software Foundation\Tomcat 7.0_Tomcat7\bin and double click Tomcat.exe, a command prompt like screen will appear this is the the same as clicking startup.bat script. Hope this helps

如果你想用startup.bat启动Tomcat服务器却找不到(因为安装程序没有它,你只有下载并运行.zip才能看到它,这将显式显示startup.bat https:/ /www.screencast.com/t/RMPCq5eJre3),所以要解决这个问题,只需转到 C:\Program Files\Apache Software Foundation\Tomcat 7.0_Tomcat7\bin 并双击 Tomcat.exe,就会出现类似 screen 的命令提示符与单击startup.bat 脚本相同。希望这可以帮助