kui-vault/06.Archive/aimSystems/Java/PID.md

13 lines
379 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Process ID
jps
JDK에 포함되어 있는 JPS 명령어를 활용해서 JVM 내부에서 돌아가고 있는 PID를 파악합니다.
[-v] 옵션을 추가적으로 입력 시 실행 시 입력된 parameter도 확인할 수 있습니다.
Java code로 PID 출력하기
```java
`System.out.println(``"ProcessID(PID): "` `+ ManagementFactory.getRuntimeMXBean().getName());`
```