1.I already tried by wmic process get name,executablepath,processid|findstr pid. but the result is the path of java.exe rather than i expected.i want to get the java app's full path like test.jar's full path. xx.bat:
%~d0
cd %~dp0
java -jar test.jar
2.java code:
String path = "..../xx.bat";
String cmd = "cmd /c start " + path.replaceAll(" ", "\" \"");
process = Runtime.getRuntime().exec(cmd);
3.the question is: how can i get the java app named test full path.