Properties file unload

The following problem occurs :

When i load properties - i get from a file - into the system

FileInputStream propFile =new FileInputStream("myProperties.txt");

Properties p =new Properties(System.getProperties());

p.load(propFile);

// set the system properties

System.setProperties(p);

and i want to delete that file later on to create another file with the same name... it doesn't delete that file.

My question is...is there a possibility to first UNLOAD that properties-file,so i can get rid of 'myProperties.txt'

thx

[712 byte] By [burnheada] at [2007-11-26 16:03:31]
# 1
Maybe closing the stream before deleting the file might be a good idea...Though I don't see why you want to delete and re-write a properties file.
CeciNEstPasUnProgrammeura at 2007-7-8 22:25:22 > top of Java-index,Java Essentials,Java Programming...
# 2
Just want to rewrite the property-file every time a stop running the program. So i can start with new values at the next session
burnheada at 2007-7-8 22:25:22 > top of Java-index,Java Essentials,Java Programming...
# 3
rewriting the properties file...and at the next start of the program having another properties file gives me the possibility to always have another user.dir, user.home, etc. Very interesting for my app ;-)
burnheada at 2007-7-8 22:25:22 > top of Java-index,Java Essentials,Java Programming...