Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirect the output of verbose jvm to specific file

Tags:

java

jvm

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

like image 634
Essam Qasem Avatar asked Sep 19 '25 05:09

Essam Qasem


1 Answers

JDK 8

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

JDK 9+

java -Xlog::file=test.log
like image 180
apangin Avatar answered Sep 20 '25 21:09

apangin