C4C*_*Exe 8 java debugging windows-services intellij-idea
我有一个已安装的窗口服务.我在Intelli J.中打开了应用程序的源代码.
我将配置IntelliJ如下所示

我检查了它正在使用的服务和端口的PID.
在Intelli J中运行远程配置时会出现以下错误
4:09:18 PM Error running Remote: Unable to open debugger port : java.net.ConnectException "Connection refused: connect"
Run Code Online (Sandbox Code Playgroud)
有人可以说明如何在IntelliJ中调试窗口服务.这是一份工作计划申请.
installService.cmd如下
set HOME_DIR=%~dp0
set SERVICE="Service_Name"
SET JAVA_OPTIONS=-Xms256m -Xmx256m
@echo Service name is Service_Name
"pathname\Service_Name.exe" -install %SERVICE% %JVM% %JAVA_OPTIONS% -Djava.class.path="pathname\Service_Name.jar" -Dorg.quartz.properties="pathname/Service_NameScheduler.properties" -start com.org.st.Service_Name -stop com.org.st.Service_Name -out "D:/core_log\Service_Name_service_out.log" -err "D:/core_log\Service_Name_service_error.log" -current "pathname\apps"
set JVM="C:/Program Files/Java/jdk1.6.0_29/jre/bin/server/jvm.dll"
Run Code Online (Sandbox Code Playgroud)
请将 IntelliJ 调试配置中的命令行参数附加到该行SET JAVA_OPTIONS,它将类似于
SET JAVA_OPTIONS=-Xms256m -Xmx256m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=51211
Run Code Online (Sandbox Code Playgroud)
并重新安装服务。
| 归档时间: |
|
| 查看次数: |
15643 次 |
| 最近记录: |