aspose file tools*
The moose likes General Computing and the fly likes Closing all apps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Closing all apps " Watch "Closing all apps " New topic
Author

Closing all apps

Senthil Manoharan
Greenhorn

Joined: Mar 01, 2010
Posts: 28
Hi All,

I'm trying to do an application where if i login then all the app running in windows should get closed automatically except the browser(with only the current tab ,other tab should be closed automatically) and the browser has to come in full screen, only escape and close button in the app will close the app. No other event can interrupt or close this app?

Telling simply , i want to do like the dev square app


Thanks in advance.


Thanks and Regards
Senthil Kumar M
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

As this has nothing at all to do with JSP, it's been moved to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Senthil Manoharan
Greenhorn

Joined: Mar 01, 2010
Posts: 28
Actually i want this to done in jsp or using spring...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

Neither is going to help you with this at all. You'll need to use native code.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30758
    
156

A browser cannot close other windows. Imagine if just going to a website could cause other things to happen on your machine! That would be terrible for security.

I;m not sure if ActiveX can do it but that might be something to look at for IE.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Senthil Manoharan
Greenhorn

Joined: Mar 01, 2010
Posts: 28
Thanks for your reply,
is it possible to do with java desktop application ?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

There aren't any classes in the standard Java API which allow you to interfere with other applications. You may find low-level APIs for the operating system you were thinking of, in which case you could call those APIs via JNI or JNA interfaces.
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

At some point you'll need to revert to native code in order to interact to the other apps running on your desktop. You can read up on JNI and javah. Basically the low-level system handling - i.e. the part where your app closes all the other apps running on the desktop - will have to be done in a custom written C library (for instance in a DLL file). Then you tie your Java code to this DLL file; for instance in your Java code you create a method that calls the new function in your C library that handles the closing of all other apps on your desktop.
 
Consider Paul's rocket mass heater.
 
subject: Closing all apps