ciao a tutti
ho questo esercizio:

import java.io.*;
public class Esercizio15_1b {
/* Uso InputStreamReader per leggere un file*/
public static void main(String args[]) {
char buffer[] = new char[256];
try {
InputStreamReader isr = new FileReader(args[0]);
for(int n = isr.read(buffer); n > 0; n = isr.read(buffer)) {
String s = new String(buffer, 0, n);
System.out.print(s);
}
isr.close();
} catch(ArrayIndexOutOfBoundsException d) {
System.err.println("Manca un argomento");
System.exit(-1);
} catch(IOException e) {
System.err.println("Errore di lettura");
System.exit(-1);
}
}
}

però non mi funziona mi da errore sul comando ArrayIndexOutOfBoundsException

come mai? e che cos'è questo comando che nelle mie dispense non trovo ? è così che si fa per far scrivere al programma che non ci sono argomenti in linea di comando?
grazie ciao a presto