In our project we have a requirement to open the default web browser(windows and linux) from the java application.Also when the java application is closed the browser window also need to be closed automatically.
To open the browser we use:

p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler someurl;
but to close the browser window p.destroy() fails for tabbed browsers like firefox but succeds for IE 6 which opens different windows for different pages.
Is there any option to close only the tab we opened or any other alternative way to achieve this(cant use JDIC or Desktop API).