Does anybody know how to get the application executable name (and path)
in Win95/98/WinNT/Win2000/WinMe from a windows handle (hWND) in
Visual J++?

I've used com.ms.win32.Kernel32.GetModuleFileName.
It works in Win98,
but not in WinNT if the windows handle is not the handle of the current
process (application), I need to know how to get the exe name/path
of other applications that are running from their windows handles.

Which API procedure works in all these OS?
Or what procedure would work in WinNT?

Please help