Java process jps does not show resolve, jconsole, jvisualvm can not be used, hsperfdata_% UserName% without process file a series of problems

JPS (Java Virtual Machine Process Status Tool) can display the current Java process information.
Command can be used: JPS [-q] [-mlvV] [<the hostid>]
    <the hostid>: <hostname> [: <Port>]

Enter jps cmd displays only the process ID under the current Java process and the class name.

jps -q: show only pid, does not display the class name, jar file name and arguments passed to the main method.
jps -m: Output parameters passed to the main method.
jps -l: output program main jar file's full path name of the class or the full package name of the program.
jps -v: Output parameters passed to the JVM.

JConsole , jvisualvm can monitor Java process memory, CPU and so on.

These jvm tool in the JDK bin , JDK10 in no jvisualvm.

Java process jps to get current information, relying on Windows is % TEMP% / hsperfdata_% USERNAME% directory with the process id for the file name. C: \ Temp and C: \ Users \ login user name \ AppData \ Local \ Temp has a Temp folder, usually the latter, the input% TEMP% in the address bar File Explorer Enter to view the corresponding table of Contents. If the Java program is running, no new process Temp files generated in the hsperfdata_ your user name this folder, then the question of powers can be considered. New will prompt you need in this folder administrator privileges . If you are using Java programs such as IDEA IDE running, you must open the IDE with administrator privileges , otherwise the process can not create files in this folder, then jvm tools will not be available. Process file will be deleted after the Java program properly closed. In addition, jvm process manager tool based on, even if you are responsible for compiling the corresponding JDK version JDK version Java code and run the tool is not the same jvm, jvm will not affect the use of tools. And even if you use -Djava.io.tmpdir want to change the temporary file storage location, it will not affect the process of file location.

Guess you like

Origin blog.csdn.net/haoranhaoshi/article/details/93739387