c - How to find every java process? -


is possible somehow find every running java process? need processid of java processes.

if install java developement kit, there exe called jps.rexe. if run exe finds every running java processes , lists processid. need same, written in c. jps.exe requires java developement kit installed.

also note there 2 scenarios:
- java.exe or javaw.exe (there more) process starts reuired process, in case "easy" find java processes.
- second 1 more complicated. application started, components or features requires java, , there no java.exe or javaw.exe process running, application still uses jre.

hopefully clear, want.

does have have idea how this?

thanks in advance!

(take comment unfortunately long, post answer.) providing links stumbled upon looking answer:

as using jre file means having open, sysinternals tool handle might helpful. seems use windows object manager able find open files (by path fragment) , associated processes.

the promising c source code related object manager found unfortunately seems quite outdated (1997). @ least key function ntquerydirectoryobject used there still exists although "has no associated import library or header file". might still possible make use of c code.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -