Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/08/2010, 15:50
guidojavier
 
Fecha de Ingreso: junio-2009
Mensajes: 9
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: Problema con rutas

tu metodo deberia ser algo asi:

Código:
 public AbrirFichero(String path) {
        URI uri = null;
	        try {
	            uri = new URI(path);
	        } catch (URISyntaxException ex) {
	            Logger.getLogger(Player.class.getName()).log(Level.SEVERE, null, ex);
	        }
	 
	        if (uri == null) {
	            System.out.println("error");
	        } else {
	            File file = new File(uri);
	        }
	    }
y debes llamar el metodo asi:

Código:
AbrirFichero("file:/C:/Users/usuario/tal%20user%20archivo/what_the_hell.mp3");
los %20 son por si tienes espacios en blanco en tu ruta debes remplazarlos asi.