diff options
Diffstat (limited to 'java/src/IceGridGUI/Coordinator.java')
-rw-r--r-- | java/src/IceGridGUI/Coordinator.java | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/java/src/IceGridGUI/Coordinator.java b/java/src/IceGridGUI/Coordinator.java index 4f62ca5a81e..3bd3c65a37b 100644 --- a/java/src/IceGridGUI/Coordinator.java +++ b/java/src/IceGridGUI/Coordinator.java @@ -3153,47 +3153,15 @@ public class Coordinator private void helpContents() { - if(System.getProperty("os.name").startsWith("Windows")) + int pos = Ice.Util.stringVersion().indexOf('b'); + if(pos == -1) { - java.net.URL url = ClassLoader.getSystemResource("IceGridAdmin.chm"); - if(url != null) - { - // - // Get rid of the leading "/" - // - String path = url.getPath().substring(1); - try - { - path = java.net.URLDecoder.decode(path, "UTF-8"); - } - catch(java.io.UnsupportedEncodingException ex) - { - } - try - { - Runtime.getRuntime().exec("hh.exe " + path); - return; // success - } - catch(java.io.IOException ex) - { - _initData.logger.warning(ex.toString()); - } - } - } - - // - // Otherwise, browser based-help - // - java.net.URL url = ClassLoader.getSystemResource("IceGridAdmin/index.html"); - if(url != null) - { - BareBonesBrowserLaunch.openURL(url.toString()); - } - else - { - BareBonesBrowserLaunch.openURL("http://www.zeroc.com/doc/Ice-" - + Ice.Util.stringVersion() + "/IceGridAdmin/index.html"); + pos = Ice.Util.stringVersion().lastIndexOf('.'); + assert(pos != -1); } + + String version = Ice.Util.stringVersion().substring(0, pos); + BareBonesBrowserLaunch.openURL("http://doc.zeroc.com/display/Rel/Ice+" + version + "+IceGrid+Admin"); } private void about() |