本文介绍了是否可以在JSVC中启用端口以进行远程调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个jsvc应用程序,该应用程序运行正常,但是现在我需要在应用程序上启用一个端口,以便可以进行远程调试.我正在使用Java执行上述任务.

I am running a jsvc application which is working absolutely fine but now I need to enable one port on my application so that I can do remote debugging. I am performing above task using java.

有什么办法可以完成上述任务?我已经检查了所有JSVC选项 http://commons.apache.org/proper/commons-daemon/jsvc. html ,但未找到任何内容.

Is there any way to achieve above task ?I have checked all JSVC option http://commons.apache.org/proper/commons-daemon/jsvc.html but didn't find anything.

这是添加jsvc参数的代码:

Here is the code of adding jsvc parameter :

现在,我需要将此"-agentlib:jdwp = transport = dt_socket,address = 8001,server = y,suspend = n"传递给JSVC.任何人都知道如何实现它吗?

Now I need to pass this "-agentlib:jdwp=transport=dt_socket,address=8001,server=y,suspend=n" to JSVC. Anyone has any idea how to achieve it ?

推荐答案

随着Waheed发现自己,您可以像这样向jsvc添加所需的参数:

As Waheed discover himself, you can add add the needed parameters to jsvc like this:

jsvcArgs.add("-agentlib:jdwp=transport=dt_socket,address=8001‌​,server=y,suspend=n")‌​;

这篇关于是否可以在JSVC中启用端口以进行远程调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 11:24