从 NetBeans 启动 Tomcat 时出错 - “127.0.0.1*"未被识别为内部或外部命令 [英] Error starting Tomcat from NetBeans - '127.0.0.1*' is not recognized as an internal or external command

查看:15
本文介绍了从 NetBeans 启动 Tomcat 时出错 - “127.0.0.1*"未被识别为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google 和 Stackoverflow 都向我展示了遇到类似问题的人,但此错误略有不同,因为 IP 地址后缀为星号:

Both Google and Stackoverflow have shown me people with similar issues however this error is slightly different in that the IP address is suffixed with an asterisk:

NetBeans 8.0.1 在尝试启动 Tomcat 时出现以下错误.

NetBeans 8.0.1 is giving me the following error when trying to start Tomcat.

'127.0.0.1*' 不被识别为内部或外部命令,可运行的程序或批处理文件.

'127.0.0.1*' is not recognized as an internal or external command, operable program or batch file.

我已经安装了 Tomcat 7.0.56 和 Tomcat 8.0.14,它们都可以从命令行启动(一次一个).我将它们作为 Tomcat 7 和 Tomcat 8 添加到 NetBeans 的服务器列表中.

I've got both Tomcat 7.0.56 and Tomcat 8.0.14 installed, they both start OK from the command line (one at a time). I have them added to NetBeans' list of servers as Tomcat 7 and Tomcat 8.

我已经配置了一个Hello World"网络应用程序:
属性 -> 运行 -> 服务器:尝试了 Tomcat 7 和 Tomcat 8
两者都给出相同的错误.

I have a "Hello World" web app which I have configured:
Properties -> Run -> Server: tried both Tomcat 7 and Tomcat 8
Both give the same error.

如果我尝试使用以下任一方法启动 Tomcat:
服务 -> 服务器 -> Tomcat 7 -> 开始
服务 -> 服务器 -> Tomcat 8 -> 开始
我在尝试启动 Web 应用程序时遇到相同的错误:

If I try starting Tomcat using either:
Services -> Servers -> Tomcat 7 -> Start
Services -> Servers -> Tomcat 8 -> Start
I get the same error as when trying to start a web app:

'127.0.0.1*' 不被识别为内部或外部命令,可运行的程序或批处理文件.

'127.0.0.1*' is not recognized as an internal or external command, operable program or batch file.

有什么想法吗?
即使它只是那个星号在那里做什么?

Any ideas ?
Even if it's only what that asterisk is doing there ?

推荐答案

假设您使用的是 Windows(此错误是由糟糕的 bat 文件转义引起的),这是最新版本 (7.0.568.0.14) 来解决另一个错误.尝试删除catalina.batJAVA_OPTS声明周围的".它用Tomcat 7.0.56为我修复了它代码>昨天.

Assuming you are on Windows (this bug is caused by the crappy bat files escaping), It is a bug introduced in the latest versions (7.0.56 and 8.0.14) to workaround another bug. Try to remove the " around the JAVA_OPTS declaration in catalina.bat. It fixed it for me with Tomcat 7.0.56 yesterday.

7.0.56bin/catalina.bat:179184

:noJuliConfig
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%"

..

:noJuliManager
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%"

:noJuliConfig
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%

.. 

:noJuliManager
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%

对于您的星号,它可能只是您的配置,将其附加到主机声明中.

For your asterisk, it might only be a configuration of yours somewhere that appends it to the host declaration.

我昨天在 Tomcat 的 bugtracker 上看到了这个,但我再也找不到链接了.编辑 找到了!https://issues.apache.org/bugzilla/show_bug.cgi?id=56895

I saw this on Tomcat's bugtracker yesterday but I can't find the link again. Edit Found it! https://issues.apache.org/bugzilla/show_bug.cgi?id=56895

希望它能解决您的问题.

I hope it fixes your problem.

这篇关于从 NetBeans 启动 Tomcat 时出错 - “127.0.0.1*"未被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆