Hello,
Code:
But the following code does not work. Do you have any ideas about it.
The file is probably still open in your application. At a pinch you could use deleteOnExit () instead.
Caution : Do not use deleteOnExit () On an application server or a large amount of data because there is a risk of memory leak.
Why put these files in the directory of your application?
- Whether it is temporary file, and in this case it is better to use File.createTempFile () to create them.
- Either there is config file, and in this case it is best to create a folder in the home directory of the user
Code:
File fl = new File(System.getProperty("user.home"), . MyApp ");
Bookmarks