My Java program keeps thinking that every new file is not a file, but a folder.
I had a search error, and now I can not save the file using FileWriter . If I create a new file and check if it is a file or a directory, it says that it is a directory.
I initially had a long way to go, which is why I got rid of this. I also used to write in a separate thread, and got rid of it, but the problem still persists.
If I create a new class with simple
java.io.File file = new java.io.File("test.csv"); output.print(file.isDirectory());
It looks like the truth.
However, I can save the graphics using javax.imageio. *
Can anyone help?
Edit: I am using eclispe 3.7.2 with java 1.7.0 ... File.isFile () is false, File.createNewFile () fails (java.io.FileNotFoundException (Access is Denied)). When searching in the directory that I specify, there is a new folder called test.csv. Therefore, it creates a new folder and treats it as a folder, despite the fact that I indicate that it is a csv file. I tried other file types, even without a file type. But the same problem. He believes that this is a folder, not a file. It just puzzles me.
source share