javacommand-lineprocess-explorer

Get Command Line of a java process


As we all know all java processes appear in task manager as javaw.exe. I want to get command line of all such java processes. A tool called ProcessExplorer does the same thing but it displays all that in a GUI and i am looking at a programming solution for the same.

Here is a snapshot from ProcessExplorer tool.

enter image description here

Any ideas??


Solution

  • You can get it with WMIC

    C:\> wmic process where(name="javaw.exe") get commandline