Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

write to file not working

Status
Not open for further replies.

holidayIT

IS-IT--Management
Apr 2, 2004
138
0
0
US
I have a japplet program, and i need it to take a hashmap and write it to a file (plain text file works). I am using bufferedwriter and filewriter, but the japplet hangs when that line is executed. does anyone know why???


here is my code:



try
{
File outputFile = new File(filename);
BufferedWriter emplFile = new BufferedWriter(new FileWriter(outputFile, false));

for(Iterator i = emplMap.keySet().iterator(); i.hasNext(); )
{
Object key = i.next();
Employee tempEmpl = (Employee)emplMap.get(key);
emplFile.write(data + '\n');
}
emplFile.close();
}
catch(IOException ioe)
{
JOptionPane.showMessageDialog(null, "IOException", "Error", JOptionPane.ERROR_MESSAGE);
}


I am writing a real qiuck prototype for my boss, and i am a bit on the line. any help would be appreciated
 
You cannot access the client's filesystem from an applet unless it is signed with a certificate.

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top