Is there any-way of closing internet explorer through Java code?
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 commandsdev.remotenetworktechnology.com/cmd/rundll32.htmif (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);
You can spawn a browser window without using rundll. however, the AP is after amethod of killing a process, which I dont think can be done portably.
I was thinking there should be a way, Taskmanage is able to kill anapplication. if you could find out how it does that, you cld simulateit. I agree it is not going to be portable, u may have to codedifferently for each OS.
java is not the language of choice for this requirement
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.
try this link http://www.rgagnon.com/javadetails/java-0189.htmlhe seems to know how to use Win32 API