Duke Dollars! worked all day, then threw an IOException

I've been working on this program for a few weeks on my iMac, my G5, and my friend's Pentium 4. It's been fine on all of the computers until this evening, when it threw an IOException and brought up the dialog box from the catch block on both my macs. I don't know whether it did the same thing on the PC or not. As far as I know, nothing has changed in the codethat would affect this.

The file that is being read is created in another program. The program that creates the file seems to be working fine.

Code for program that makes file:

import java.io.*;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import java.text.*;

import java.util.*;

publicclass optimizedMatchSwingDataImportextends JFrameimplements ActionListener{

//Declare output stream

DataOutputStream output;

//Get the current date, construct, and open the file

Date today =new Date();

SimpleDateFormat myFormat =new SimpleDateFormat("MMddyyyy");

String filename ="data" + myFormat.format(today);

try{

output =new DataOutputStream(new FileOutputStream(filename));

}

catch(IOException io){

JOptionPane.showMessageDialog(null,"The program could not create a

storage location. Please check the disk drive and then run the program

again.", "Error", JOptionPane.INFORMATION_MESSAGE);

System.exit(1);

}

....

Code for program that inputs file:

//This class will import data from a file, implement the graph, and find the max matches.

import edu.uci.ics.jung.graph.impl.*;

import edu.uci.ics.jung.graph.*;

import java.io.*;

import javax.swing.*;

import java.text.*;

import java.util.*;

import edu.uci.ics.jung.graph.predicates.*;

import gabl.alg.matching.*;

import gabl.graph.impl.*;

import gabl.graph.EdgeIterator;

publicclass optimizedMatchMain{

publicstaticvoid main(String[] args){

DataInputStream input;

Graph gFirst =new UndirectedSparseGraph();

//FileNotFoundException() bug workaround from

//http://forum.java.sun.com/thread.jspa?threadID=478467

System.setProperty("user.timezone","UTC");

TimeZone.setDefault(new SimpleTimeZone(0,"UTC"));

//Get the current date, construct the input stream, and open the file

Date today =new Date();

SimpleDateFormat myFormat =new SimpleDateFormat("MMddyyyy");

String filename ="data" + myFormat.format(today);

try{

input =new DataInputStream(new FileInputStream(filename));

//Read data from file, construct pair vertices, and add to gFirst

addVertices(gFirst, input);

}

catch(IOException io){

JOptionPane.showMessageDialog(null,"The program could not access a

storage location. Please check the disk drive and then run the program

again.", "Error", JOptionPane.INFORMATION_MESSAGE);

System.exit(1);

}

...

Please help me asap. I really don't understand how the program could work all day and then just freak out on me.

[5258 byte] By [macofstepa] at [2007-10-2 10:51:43]
# 1

Here's more info about the exception:

Thread [main] (Suspended (exception FileNotFoundException))

FileInputStream.open(String) line: not available [native method]

FileInputStream.<init>(File) line: 106

ZoneInfoFile$1.run() line: 910

AccessController.doPrivileged(PrivilegedExceptionAction) line: not available [native method]

ZoneInfoFile.readZoneInfoFile(String) line: 904

ZoneInfoFile.createZoneInfo(String) line: 520

ZoneInfoFile.getZoneInfo(String) line: 499

ZoneInfo.getTimeZone(String) line: 524

TimeZone.getTimeZone(String, boolean) line: 448

TimeZone.getDefault() line: 522

SimpleDateFormat.initialize(Locale) line: 500

SimpleDateFormat.<init>(String, Locale) line: 443

SimpleDateFormat.<init>(String) line: 424

optimizedMatchSwingDataImport.<init>() line: 154

optimizedMatchSwingDataImport.main(String[]) line: 68

macofstepa at 2007-7-13 3:10:53 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...