Java tutorial
import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.OutputStream; public class Main { public static void main(String[] args) { OutputStream fileOutputStream; try { fileOutputStream = new FileOutputStream("c:/a.txy"); Runtime runTime = Runtime.getRuntime(); runTime.getLocalizedOutputStream(fileOutputStream); } catch (FileNotFoundException e) { e.printStackTrace(); } } }