You are on page 1of 1

hello dr

String path = jTextField1.getText();


FileOutputStream os = null;
try {
os = new FileOutputStream(path);
} catch (FileNotFoundException ex) {
Logger.getLogger(server.class.getName()).log(Level.SEVERE, null,
ex);
}
OutputStreamWriter oswriter = new OutputStreamWriter(os);
try {
FileInputStream in = new FileInputStream(path);
} catch (FileNotFoundException ex) {
Logger.getLogger(server.class.getName()).log(Level.SEVERE, null,
ex);
}
try {
oswriter.write("hello dr");
oswriter.flush();
} catch (IOException ex) {
Logger.getLogger(server.class.getName()).log(Level.SEVERE, null,
ex);
}

You might also like