I need to execute the following command from a web application deployed on cloudfoundry
.
String javaHome = System.getenv("JAVA_HOME");
String javaLocation = javaHome+"/bin/java";
String command = javaLocation+" -Xms256m -Xmx512m -Dcom.sun.btrace.probeDescPath=. -Dcom.sun.btrace.dumpClasses=false -Dcom.sun.btrace.debug=false -Dcom.sun.btrace.unsafe=false -cp "+btraceLib+":"+toolsLib+ " com.sun.btrace.client.Main "+pid+" "+probeScript;
Process p = runTime.exec(command);
But I get the following error:
Unable to open socket file: target process not responding or HotSpot VM not loaded
I tried with different bounds on heap-size for jvm but get the same error.
How can I resolve the error?