'jmap -dump : format = b; Runtime.exec의()에서 "명령 파일,하지만 날짜와 같은 다른 명령, PWD가 잘 작동하는 곳은 늘 실행합니다. 사람이 이유를 알 수 있습니까?JMAP -dump가 java : runtime.exec()에서 실행되지 않았습니다.
공공 정적 무효 명령을 (문자열들) {
runtime=Runtime.getRuntime();
try {
System.out.println(" Creating Heap Dump ");
process=runtime.exec("jmap -dump:format=b,file=D:/heapdump_2012APR10/heapdump_date +%d%b%Y-%H_%M_%S.bin 4478");
System.out.println("Heap Dump Created. Zipping the file");
process=runtime.exec("gzip *.bin");
System.out.println("Succesfully zipped");
} catch (Exception e) {
e.printStackTrace();
}
}
당신은 두 개의 전화
전화를 걸 때 사용하는 코드를 표시하십시오. –
해결 방법은 *** Runtime.exec()이 권장하지 않는 모든 *** ***을 구현하여 찾을 수 있습니다 (http://www.javaworld.com/javaworld/jw-12-2000/). jw-1229-traps.html). –
코드가 추가되었습니다 .. – Loga