java IO问题
import java.io.*;
import java.io.File;
public class FileTest
{
public static void main(String[] args) throws IOException
{
try
{
File f1 = new File ("c:\\css.txt\\c1.txt");
File f2 = new File ("c:\\cxx.txt\\c2.txt");
FileInputStream in = new FileInputStream ( f1 );
FileWriter out = new FileWriter (f2 );
int c = 0;
while (( c = in.read())!=-1)
{
System.out.println(c);
out.write(c);
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
}
在jbuile 8 下运行,提示 系统找不到指定的文件 ,但在这个路径下有这个文件,而且文件属性可读写,实在搞不定了
java.io.FileNotFoundException: c:\css.txt\c1.txt (系统找不到指定的文件。)
at java.io.FileInputStream.open(Native Method)