< prev index next >

modules/javafx.graphics/src/main/java/com/sun/javafx/application/HostServicesDelegate.java

Print this page

        

*** 23,32 **** --- 23,33 ---- * questions. */ package com.sun.javafx.application; + import java.awt.Desktop; import java.io.File; import java.lang.reflect.Method; import java.net.URI; import java.security.AccessController; import java.security.PrivilegedActionException;
*** 168,180 **** @Override public void showDocument(final String uri) { String osName = System.getProperty("os.name"); try { if (osName.startsWith("Mac OS")) { ! Class.forName("com.apple.eio.FileManager").getDeclaredMethod( ! "openURL", new Class[]{String.class}).invoke(null, ! new Object[]{uri}); } else if (osName.startsWith("Windows")) { Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler " + uri); } else { //assume Unix or Linux String browser = null; --- 169,179 ---- @Override public void showDocument(final String uri) { String osName = System.getProperty("os.name"); try { if (osName.startsWith("Mac OS")) { ! Desktop.getDesktop().browse(URI.create(uri)); } else if (osName.startsWith("Windows")) { Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler " + uri); } else { //assume Unix or Linux String browser = null;
< prev index next >