我正在尝试在新系统上调试我使用 Maven 构建的项目。命令 mvn tomcat:run
运行正常,但是,它因 mvnDebug tomcat:run
而失败。
C:\project>mvnDebug tomcat:run
Preparing to Execute Maven in Debug Mode
ERROR: transport error 202: bind failed: Permission denied
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
pom.xml中定义的插件是:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
</plugin>
我无法找到解释“权限被拒绝”问题的解决方案。我确实找到了一个帖子here在 SO 上,但它有一个“地址已在使用”的问题。
最佳答案
可能有其他东西绑定(bind)到端口 8000
,或者它可能以某种方式被阻止。尝试使用另一个端口,看看您是否能够绑定(bind)到该端口。有详情here .基本上,您必须更改 mvnDebug.bat
批处理文件以使用另一个端口。
关于java - mvnDebug 因权限被拒绝而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19841863/