I am running a jsvc application that works absolutely fine, but now I need to enable one port in my application so that I can perform remote debugging. I am performing a task using java.
Is there a way to achieve the above objective? I checked all the JSVC parameters http://commons.apache.org/proper/commons-daemon/jsvc.html , but found nothing.
Here is the code to add the jsvc parameter:
private list getJSVCArgs () {list jsvcArgs = new ArrayList (); jsvcArgs.add (jsvcDir + "/ JSVC"); jsvcArgs.add ("- PidFile"); jsvcArgs.add ("pidfile.pid"); jsvcArgs.add ("- output_file"); jsvcArgs.add ("outfile.txt"); jsvcArgs.add ("- errfile"); jsvcArgs.add ("errfile.txt"); jsvcArgs.add ("- wait"); jsvcArgs.add (String.valueOf (jvmProperties.get ("- wait"))); jsvcArgs.add ("- user"); jsvcArgs.add (System.getProperty ("user.name")); jsvcArgs.add ("- home"); jsvcArgs.add (System.getProperty ("java.home")); return jsvcArgs; }
Now I need to pass this "-agentlib: jdwp = transport = dt_socket, address = 8001, server = y, suspend = n" to JSVC. Does anyone know how to achieve it?
source share