• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to find applications running on a window  RSS feed

 
a gandhi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • 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?
 
Paul Reedman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!