aを directory.jar
にエクスポートするファイルがあるとします。これを行うコードは以下のとおりです。ただし、このフォルダが実際には. コンストラクターを使用して、次のような完全に異なるフォルダーに送信するにはどうすればよいですか?temple.txt
~/output
output
home/workspace/temp/output
File(..)
temple.txt
home/Desktop/hello/
public class main {
public static void main(String[] args) throws IOException {
String directory = "output";
FileWriter fstream;
BufferedWriter out;
File file = new File(directory, "temple.txt");
fstream = new FileWriter(file);
out = new BufferedWriter(fstream);
out.write(String.valueOf(1));
out.close();
}
}