M
M
Hi All,
I have problem in writing a hashtable to the file system
and hope you can give me some hints. The problem is like
this:
My hashtable consists of a key of type "String" and the
value is a object of a class WorkNature:
class WorkNature {
String responsible;
Vector duties;
}
It seems that I can write data to the hashtable (myHashTable)
but when I try to put it to the file system, there's some
problem. The code I used was:
void writeSysFile() {
final String PHY_FILE = "d:/Work_Nature";
try {
ObjectOutputStream os =
new ObjectOutputStream(new FileOutputStream(PHY_FILE));
os.writeObject(myHashTable);
os.close();
} catch (Exception e) {
System.out.println("writeSysFile: " + e.getLocalizedMessage());
}
}
Error "writeFile: myJavaProgram$WorkNature" was displayed !
Any ideas?
Thanks.
I have problem in writing a hashtable to the file system
and hope you can give me some hints. The problem is like
this:
My hashtable consists of a key of type "String" and the
value is a object of a class WorkNature:
class WorkNature {
String responsible;
Vector duties;
}
It seems that I can write data to the hashtable (myHashTable)
but when I try to put it to the file system, there's some
problem. The code I used was:
void writeSysFile() {
final String PHY_FILE = "d:/Work_Nature";
try {
ObjectOutputStream os =
new ObjectOutputStream(new FileOutputStream(PHY_FILE));
os.writeObject(myHashTable);
os.close();
} catch (Exception e) {
System.out.println("writeSysFile: " + e.getLocalizedMessage());
}
}
Error "writeFile: myJavaProgram$WorkNature" was displayed !
Any ideas?
Thanks.