- final public static void launchWebBrowser( final URI uri,
- final String frame_name ) throws IOException {
-
- // This requires Java 1.6:
- // =======================
- // boolean no_desktop = false;
- // try {
- // if ( Desktop.isDesktopSupported() ) {
- // System.out.println( "desktop supported" );
- // final Desktop dt = Desktop.getDesktop();
- // dt.browse( uri );
- // }
- // else {
- // no_desktop = true;
- // }
- // }
- // catch ( final Exception ex ) {
- // ex.printStackTrace();
- // no_desktop = true;
- // }
- // catch ( final Error er ) {
- // er.printStackTrace();
- // no_desktop = true;
- // }
- // if ( no_desktop ) {
- // System.out.println( "desktop not supported" );
- try {
- openUrlInWebBrowser( uri.toString() );
- }
- catch ( final Exception e ) {
- throw new IOException( e );
- }
- // }
-
+ final public static void launchWebBrowser( final URI uri, final String frame_name ) throws IOException {
+ // This requires Java 1.6:
+ // =======================
+ // boolean no_desktop = false;
+ // try {
+ // if ( Desktop.isDesktopSupported() ) {
+ // System.out.println( "desktop supported" );
+ // final Desktop dt = Desktop.getDesktop();
+ // dt.browse( uri );
+ // }
+ // else {
+ // no_desktop = true;
+ // }
+ // }
+ // catch ( final Exception ex ) {
+ // ex.printStackTrace();
+ // no_desktop = true;
+ // }
+ // catch ( final Error er ) {
+ // er.printStackTrace();
+ // no_desktop = true;
+ // }
+ // if ( no_desktop ) {
+ // System.out.println( "desktop not supported" );
+ try {
+ openUrlInWebBrowser( uri.toString() );
+ }
+ catch ( final Exception e ) {
+ throw new IOException( e );
+ }
+ // }