public static final void open(File file) throws NoSuchMethodException {
  if (Platform.isMacOSX()) {
    execArgs("open",file.getAbsolutePath());
  }
 else   if (Platform.isWindows()) {
    if (file.isDirectory()) {
      execArgs("explorer",file.getAbsolutePath());
    }
 else {
      execArgs("start",file.getAbsolutePath());
    }
  }
 else   if (Platform.isUnix() && hasUnixCommand("gnome-open")) {
    execArgs("gnome-open",file.toString());
  }
 else   if (Platform.isUnix() && hasUnixCommand("konqueror")) {
    execArgs("konqueror",file.toString());
  }
 else   if (Platform.isSolaris() && file.isDirectory()) {
    execArgs("/usr/dt/bin/dtfile","-folder",file.getAbsolutePath());
  }
 else {
    throw new NoSuchMethodException("Cannot open files on this platform");
  }
}

public static final void open ( File file ) throws NoSuchMethodException { if ( Platform . isMacOSX ( ) ) { execArgs ( "open" , file . getAbsolutePath ( ) ) ; } else if ( Platform . isWindows ( ) ) { if ( file . isDirectory ( ) ) { execArgs ( "explorer" , file . getAbsolutePath ( ) ) ; } else { execArgs ( "start" , file . getAbsolutePath ( ) ) ; } } else if ( Platform . isUnix ( ) && hasUnixCommand ( "gnome-open" ) ) { execArgs ( "gnome-open" , file . toString ( ) ) ; } else if ( Platform . isUnix ( ) && hasUnixCommand ( "konqueror" ) ) { execArgs ( "konqueror" , file . toString ( ) ) ; } else if ( Platform . isSolaris ( ) && file . isDirectory ( ) ) { execArgs ( "/usr/dt/bin/dtfile" , "-folder" , file . getAbsolutePath ( ) ) ; } else { throw new NoSuchMethodException ( "Cannot open files on this platform" ) ; } }
opens a file with the default system action .
