Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/03/2012, 09:33
Avatar de FiruzzZ
FiruzzZ
 
Fecha de Ingreso: diciembre-2007
Ubicación: en casa
Mensajes: 470
Antigüedad: 16 años, 4 meses
Puntos: 41
Respuesta: Equivalente clase Desktop en jdk 1.5

Para un entorno Windows..
Código Java:
Ver original
  1. try {
  2.  
  3.         if ((new File("c:\\Java-Interview.pdf")).exists()) {
  4.  
  5.             Process p = Runtime
  6.                .getRuntime()
  7.                .exec("rundll32 url.dll,FileProtocolHandler c:\\Java-Interview.pdf");
  8.             p.waitFor();
  9.  
  10.         } else {
  11.  
  12.             System.out.println("File is not exists");
  13.  
  14.         }
  15.  
  16.         System.out.println("Done");
  17.  
  18.       } catch (Exception ex) {
  19.         ex.printStackTrace();
  20.       }

PD: Googleando 2 segundos.. vas a encontrar varias respuestas mas..
__________________
BadProgrammerException!