wood burning stoves 2.0*
The moose likes Java in General and the fly likes A method to close application window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "A method to close application window" Watch "A method to close application window" New topic
Author

A method to close application window

sandhya kale
Greenhorn

Joined: Dec 07, 2011
Posts: 24
Hello Every One!!!

I am developing Windows XP's Task Manager using netbeans IDE.
In that i got a method to kill(close) processes.

i used "taskill/pid/process_name" command to kill process.
and here goes those statements...

Runtime rt=new Runtime.getRuntime();
Process pr=rt.exec(taskill/pid/process_name);

but didn't get a method to close application window???
If anybody knows please post here.


Thanking You!!!
Nitin Surana
Ranch Hand

Joined: Jan 21, 2011
Posts: 129

Which application window are you talking about?

The window of the task manager you have built or the window of the process you just killed.
sandhya kale
Greenhorn

Joined: Dec 07, 2011
Posts: 24
No... am not talking about Task manager's window,am talking about application windows that are open on your system.

Like in windows we open task manager by CTRL+ALT+DEL.
in that a very first option is Application tab(A list of Applications and System's Application windows).

So i want to close any application that a user selects.

I didn't get any way to do so using netbeans.
Nitin Surana
Ranch Hand

Joined: Jan 21, 2011
Posts: 129

Then ending the process corresponding to that application will do so.
One more thing, I myself about an year ago have developed a software like this but I used this



and in my case I had no such problem of non-closing application window. May be you can try the above code.
sandhya kale
Greenhorn

Joined: Dec 07, 2011
Posts: 24


yes i tried this same "taskkill/f/im" +name....today,but it didn't work...
can you post here your email-id so that i can mail my code to you...
you will be able to find where i am making mistake...Thank you...
O. Ziggy
Ranch Hand

Joined: Oct 02, 2005
Posts: 430

Wrong forum
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A method to close application window