L
Loek Raemakers
Ls,
My application runs on a Novell intra-network (NDS6).
The application consists of different frames.
My problem is: one method does not write to a file.
On a stand alone (Windows '98 and XP) this problem does not occur.
The method is:
public void Herschrijver()
{
String text = "blablabla";
String dir = System.getProperty("user.dir");
String sep = System.getProperty("file.separator");
String bestand = "Opgaven.txt";
String pad = dir + sep + bestand;
try
{
Writer fw = new FileWriter(pad);
w.write(text);
fw.close();
}
catch(Exception e)
{
//ta.setText("Fout bij opslaan" + "\n" + e.toString());
}
//ta.setText("Goed opgeslagen");
}
Using the next line of code in the above method works fine;
Writer fw = new FileWriter(pad,true);// append text, is not what I want.
Using 'false' instead of 'true' does not write.
On the file 'Opgaven.txt' I have the netware rights indicated by:
R-W-E-C-M-F.
I do not catch an exception, I get the message in textarea (ta): Goed opgeslagen
Does my (bad) java code cause the problem?
Is it a question of netware rights or inheritance of these rights by different
frames?
Thanks for any help.
Loek eR
My application runs on a Novell intra-network (NDS6).
The application consists of different frames.
My problem is: one method does not write to a file.
On a stand alone (Windows '98 and XP) this problem does not occur.
The method is:
public void Herschrijver()
{
String text = "blablabla";
String dir = System.getProperty("user.dir");
String sep = System.getProperty("file.separator");
String bestand = "Opgaven.txt";
String pad = dir + sep + bestand;
try
{
Writer fw = new FileWriter(pad);
w.write(text);
fw.close();
}
catch(Exception e)
{
//ta.setText("Fout bij opslaan" + "\n" + e.toString());
}
//ta.setText("Goed opgeslagen");
}
Using the next line of code in the above method works fine;
Writer fw = new FileWriter(pad,true);// append text, is not what I want.
Using 'false' instead of 'true' does not write.
On the file 'Opgaven.txt' I have the netware rights indicated by:
R-W-E-C-M-F.
I do not catch an exception, I get the message in textarea (ta): Goed opgeslagen
Does my (bad) java code cause the problem?
Is it a question of netware rights or inheritance of these rights by different
frames?
Thanks for any help.
Loek eR