你的当前目录下有"word.txt" 吗?没有,当然会报错,win98下可能正好有这么个文件。
解决方案 »
- java中关于鼠标定位的问题
- 一段程序的问题
- java finally问题-灌水的避一下,谢谢
- isInstance,isAssignableFrom两个方法的用法
- 【求助】JAVA基础的一个小问题
- 编程语言实例大全(JAVA.C.C#.C++).chm怎么打开呀
- List 分行变色问题!
- 学软件开发和英语的联系→本人很迷茫,希望高手说下。。
- java实现zip压缩的问题
- 如何加.jar文件到weblogic里,在windows平台上。
- 哪里有JBUILDER6.0企业版下在?
- qxluo(大头虾,不是大虾) 还是不行啊http://www.csdn.net/expert/Topicview2.asp?id=645663
File m_fConfRecordPath = null;
m_strPath=System.getProperty("user.dir");
m_fConfRecordPath=new File(m_strPath);
if(!m_fConfRecordPath.exists())
{
m_fConfRecordPath.mkdir();
}
File m_fFileRecord=new File(m_fConfRecordPath,"word.txt");
System.out.println("新建文件成功");
// BufferedReader file=new BufferedReader(new FileReader(m_fFileRecord));try
{
String strValueTemp = "";
FileOutputStream fos = new FileOutputStream(m_fFileRecord);
DataOutputStream dout = new DataOutputStream(fos);
dout.writeUTF("中国");
fos.close();
}
catch(FileNotFoundException e)
{
;
}
catch(IOException ee)
{
;
}