Java Reference
In-Depth Information
L ISTING D.3 Continued
String windDir = System.getProperties().getProperty(“user.home”);
browser = windDir+”\\”+”explorer “;
}
}
/**
* return the codebase. Not supported
*/
public URL getCodeBase(){
return null;
}
/**
* whether is offline or not
* (trivially implemented: always return false)
*/
public boolean isOffline(){
return false;
}
/**
* whether a web browser is supported
*/
public boolean isWebBrowserSupported(){
return isBrowserSupported;
}
/**
* bring up a Web browser window
*/
public boolean showDocument(URL url){
//
try {
Runtime.getRuntime().exec(browser + url);
} catch (Exception ex) {
System.out.println(“executing “+browser+”: “+ex);
}
return true;
}
}
Search WWH ::




Custom Search