AccessControlException: What am I doing wrong?
Hey guys. I am trying to read an write fileson the web server that the applet is on but I keep getting an AccessControlException error. Here is the method that is getting the error:
publicvoid saveFile()
{
File dayFile =new File( fileName );
try
{
BufferedWriter out =new BufferedWriter(new FileWriter(dayFile));
for(int i = 1; i <=9 ; i++)
{
out.write(prayerSection[i].textarea.getText());
}
out.close();
JOptionPane.showMessageDialog(null,"File " + fileName +" has been saved.","Alert", JOptionPane.ERROR_MESSAGE);
}
catch (IOException e)
{
JOptionPane.showMessageDialog(null,"An error has occured while trying to write the file","Alert", JOptionPane.ERROR_MESSAGE);
}
}
Nothing too exciting but I just can't seem to get it to work. Thanks guys.
-Bradly

