I get a ArrayIndexOutOfBoundsException. The cause is this snippet:
public static void main(String[] args) {
//command line param
try {
[B]if (args[0] != null) {[/B]
if (args[0].equals("printer")) {
printToFile = false;
}
}
} catch (Exception oob) {
oob.printStackTrace();
}
I don't give the program any parameters when I start it up, so args[0] is null, but that shouldn't cause this error, should it?