sivaprakasam
asked on
writing to file .....(java.io.tmpdir)
hi ...
i have a problem in writing the file to the temporary folder .....the file is not created ..if i give the path name by myself then the file is created .....
.
kindly anyone help me ....
Thanks in advance ....
MY CODING :
public void filewrite()
{
try {
String temppath = new String(System.getProperty( "java.io.t mpdir"));
String fileName = "temppath,outfile.txt";
BufferedWriter out = new BufferedWriter(new FileWriter(fileName));
out.write("DB_CONNECTION = ");
out.write(DBConnection.get Text());
out.write("; ");
out.write(DBname.getText() );
out.write("; ");
out.write(Username.getText ());
out.write("; ");
out.write(password.getPass word());
out.close();
} catch (IOException e) {
System.out.println("IOExce ption:"+e) ;
e.printStackTrace();
}
}
i have a problem in writing the file to the temporary folder .....the file is not created ..if i give the path name by myself then the file is created .....
.
kindly anyone help me ....
Thanks in advance ....
MY CODING :
public void filewrite()
{
try {
String temppath = new String(System.getProperty(
String fileName = "temppath,outfile.txt";
BufferedWriter out = new BufferedWriter(new FileWriter(fileName));
out.write("DB_CONNECTION = ");
out.write(DBConnection.get
out.write("; ");
out.write(DBname.getText()
out.write("; ");
out.write(Username.getText
out.write("; ");
out.write(password.getPass
out.close();
} catch (IOException e) {
System.out.println("IOExce
e.printStackTrace();
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:)
Try to get rid of the comma and try again.