Hi Guys
I have a problem please guide me :)
I write this method :
public void createTempFile() throws Exception{
//CHTYPE & FINAL are Vector
File file = File.createTempFile("Temp", ".txt", new File(System.getProperty("user.dir")));
file.deleteOnExit();
FileWriter fw = new java.io.FileWriter(file);
for (String aContent : CHTYPE) fw.write(aContent + "\n");
fw.close();
traffic tr = new traffic(file);
for (int i = 0; i < tr.result.size(); i++)
FINAL.add(tr.result.get(i));
getEHRACT(); //Calculating in some integer & some Double
}
when I run this method in IDE(Intellij Idea) it's correctly run and a temp file delete after this line
file.deleteOnExit();
but when I make my application as a jar file this file doesn't delete till I exit my application and some calculations don't execute :( why?
Please help me thanks ...