• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to find applications running on a window

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to find the applications running on my window and the application names. I am just wondering if there is any API to find the application names. I know that there is an api to find the processes running in java.
Please, let me know if any one has any idea or suggestions regarding the same.
Thanks,
Gandhi
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think there is no in-build functionality for that.
It will be very platform-dependent.
Perhaps you may program it in C/ C++ and then use JNI.
On Linux you may scan the /proc - Filesystem and collect the data from there, find the X-Server and dependent programs.
Do you only want to find UserPrograms or SystemPrograms running in the Background too? I don't think so - you're talking about 'window'.
Only visible windows or even iconified programs?
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The WIN32 API provides a FindWindow function. You can use this to obtain the window handle. After obtaining the handle you can manipulate the window and its contents.
I doubt Java provides this function as its very specific to Windows. This is OK given the Java goal of platform independence.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic