|
发表于 2005-3-11 20:20:40
|
显示全部楼层
- Properties properties = System.getProperties();
- String osName = properties.getProperty("os.name");
- if (osName.indexOf("Linux") != -1) {
- Runtime.getRuntime().exec("htmlview");
- } else if (osName.indexOf("Windwos") != -1){
- Runtime.getRuntime().exec("iexplorer.exe");
- } else {
- throw new Exception("Unknown OS.");
- }
复制代码 |
|