ho fatto cosi:
ma mi dice accesso negato in caso fileName = "c:\\pippo"codice:public static void listFile( String fileName ) { FileReader theFile; BufferedReader fileIn = null; String oneLine; System.out.println( "FILE: " + fileName ); try { theFile = new FileReader( fileName ); fileIn = new BufferedReader( theFile ); while( ( oneLine = fileIn.readLine( ) ) != null ) System.out.println( oneLine ); } catch( IOException e ) { System.out.println( e ); } finally { // Close the stream try { if(fileIn != null ) fileIn.close( ); } catch( IOException e ) { } } }
come mai?

Rispondi quotando