I needed to create a file in a folder, but no matter what methods I tried, they write an error. They all sound like this:
(The system cannot find the specified path)
so, in my project there is a folder "Save" in it you need to create a file
I tried this option:
String filePath = new File("Save").getAbsolutePath(); FileWriter fstream = new FileWriter(filePath + "\\test.txt"); BufferedWriter out = new BufferedWriter(fstream); and here it is:
String filePath = new File("Save").getAbsolutePath(); File file = new File(filePath + "\\test.txt"); file.createNewFile(); all to no purpose
On the Internet there is nothing sensible found. Thank you in advance.
filePath? Does he point to the correct folder? - default locale