Hello.
This java app I'm developing on NetBeans 7.
When i run the project, line 4 below:
FileReader input = new FileReader("projects");
is not executed and apparently stops execution.
Only when debuggin the file or running step by step are the next lines executed.
No execution past line 4, except when debugging.
I've tried with and without the file present, but only when debugging is the line executed, otherwise it just stops.
On the IDE, I've enabled web-star (will deploy that way) and used no codebase for local testing.
Any help greatly appreciated.
private void readFileButtonActionPerformed(java.awt.event.ActionEvent evt) {
try {
JOptionPane.showMessageDialog(null, "Will read file", "clear.", WIDTH);
FileReader input = new FileReader("projects");
JOptionPane.showMessageDialog(null, "Done reading file", "clear.", WIDTH);
} catch (ArrayIndexOutOfBoundsException e) {
/* If no file was passed on the command line, this expception is
generated. A message indicating how to the class should be
called is displayed */
JOptionPane.showMessageDialog(null, "Unable to open Project file. (IOOB)", "Error: Contact Programmer.", WIDTH);
} catch (IOException e) {
// If another exception is generated, print a stack trace
JOptionPane.showMessageDialog(null, "Unable to open Project file. (IO)", "Error: Contact Programmer.", WIDTH);
// e.printStackTrace();
}
}