Essam Qasem
Essam Qasem

Reputation: 41

Redirect the output of verbose jvm to specific file

Is there a way to redirect the output of jvm which resulted of passing verbose the the java process to specific file?

Upvotes: 4

Views: 1977

Answers (1)

apangin
apangin

Reputation: 98334

JDK 8

java -verbose -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:-DisplayVMOutput -XX:LogFile=test.log

JDK 9+

java -Xlog::file=test.log

Upvotes: 5

Related Questions