Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Kill App

  Asked By: Bertha    Date: Jul 13    Category: Java    Views: 610
  

Is there any-way of closing internet explorer through Java code?

Share: 

 

6 Answers Found

 
Answer #1    Answered By: Olga Kates     Answered On: Jul 13

Can u use "rundll32" to make it work ?
I have seen developers use "rundll32" to open IE from java  code.
Here's a link on rundll commands
dev.remotenetworktechnology.com/cmd/rundll32.htm


if (url.getProtocol().equals("file")) {
command = "rundll32 url.dll,FileProtocolHandler
"+Tools.urlGetFile(url);
} else if (url.toString().startsWith("mailto:")) {
command = "rundll32 url.dll,FileProtocolHandler "+url.toString();

Runtime.getRuntime().exec(command);

 
Answer #2    Answered By: Milind Mishra     Answered On: Jul 13

You can spawn a browser window without using rundll. however, the AP is after a
method of killing a process, which I dont think can be done portably.

 
Answer #3    Answered By: Jamie Williams     Answered On: Jul 13

I was thinking there should be a way, Taskmanage is able to kill  an
application. if you could find out how it does that, you cld simulate
it. I agree it is not going to be portable, u may have to code
differently for each OS.

 
Answer #4    Answered By: Darrell Harvey     Answered On: Jul 13

java is not the language of choice for this requirement

 
Answer #5    Answered By: Bethany Hughes     Answered On: Jul 13

I have been trying to use the JNI so I can call the Win32 API:
'TerminateProcess'.
But I was having problems getting windows handles through Java.

 
Answer #6    Answered By: Herbert Weaver     Answered On: Jul 13

try this link http://www.rgagnon.com/javadetails/java-0189.html

he seems to know how to use Win32 API

 
Didn't find what you were looking for? Find more on Kill App Or get search suggestion and latest updates.




Tagged: