C# .NET - "See" running Java apps from within a C# app

Asked By Rolf Keller on 05-Sep-13 09:07 AM

In my C# application I have to determine the Windows process (ID, name and what have you) that displays a specific window. To this end I pinvoke WindowFromPoint() followed by GetWindowThreadProcessId().

This works perfectly als long as the window isn't a Java window.

If it is a Java window the process name I get is "javaw" (= Sun's Java VM). But what I need is the name of the Java application that runs within the Java VM.

Is there any way to get that info from my C# application?