Apri il tuo editor di testo e salvare immediatamente il nuovo file come 
 2 
Incollare il codice riportato di seguito nel all'editor:
 import java.io.IOException ; 
 
 public class BrowserKill { 
 
 public static void main (String [] args ) throws IOException { 
 
 String os = System.getProperty ( " os.name " ) ; 
 
 se ( os.contains ( "Windows" ) ) { 
 
 Runtime.getRuntime ( ) exec ( " taskkill /F /IM chrome.exe " . ) . 
 
 Runtime.getRuntime ( ) exec ( " taskkill /F /IM iexplorer.exe ") . 
 
 Runtime.getRuntime ( ) exec ( " taskkill /F /IM firefox . exe ") . 
 
 Runtime.getRuntime ( ) exec ( " taskkill /F /IM safari.exe ") . 
 
 Runtime.getRuntime ( ) exec ( " taskkill /F /IM opera.exe " ) ; 
 
 } else { 
 
 //Assumendo un sistema operativo non Windows sarà qualche versione di Unix , Linux o Mac 
 
Runtime.getRuntime ( ) . exec ( "kill ` ps - ef
Programmazione © www.354353.com