[Java] // /////////////////// Bare Bones Browser Launch /// Version 1.5 (December 10,200 5) /// By Dem Pilafian /// supported: Mac OS X, GNU/Linux, Unix, windows XP /// available for free /////////////////////////////// //// // //// /// *** @ author Dem Pilafian * @ author John kristian */import java. lang. reflect. method; public class nima {public static void openUR L (String url) {try {browse (url);} catch (Exception e) {}} private static void browse (String url) throws Exception {// get the operating System name String osName = System. getProperty ("OS. name "," "); if (osName. startsWith ("Mac OS") {// open method of Apple Class fileMgr = Class. forName ("com. apple. eio. fileManager "); Method openURL = fileMgr. getDeclaredMethod ("openURL", new Class [] {String. class}); openURL. invoke (null, new O Bject [] {url});} else if (osName. startsWith ("Windows") {// windows open mode. Runtime.getruntime(cmd.exe c ("rundll32 url. dll, FileProtocolHandler "+ url);} open else {// String [] browsers = {" firefox "," opera "," konqueror ", "epiphany", "mozilla", "netscape"}; String browser = null; for (int count = 0; count <browsers. length & browser = null; count ++) // run the code and exit after brower has a value. // if the process is successfully created, = 0 indicates that the process ends normally. If (runtime.getruntime(cmd.exe c (new String [] {"which", browsers [count]}). waitFor () = 0) browser = browsers [count]; if (browser = null) throw new Exception ("cocould not find web browser "); else // This value has successfully obtained a process. Runtime.getruntime(cmd.exe c (new String [] {browser, url}) ;}} public static void main (String [] args) throws InterruptedException {www.2cto.com String url = "http://www.baidu.com/"; nima. openURL (url); Thread. sleep (1000); url = "http://www.sina.com/"; nima. openURL (url) ;}} opens the second page at intervals. You can try sleep for a while.