我的项目刚开始是GBK格式编码的,现在想把src文件夹里所有文本文件转成UTF-8编码格式,但是运行却报错了。
错误提示:
java.io.FileNotFoundException: H:\exam\src (拒绝访问。)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at com.itheima.CopyFold_My.copyFile(CopyFold_My.java:56)
at com.itheima.CopyFold_My.copyFolder(CopyFold_My.java:33)
at com.itheima.CopyFold_My.copyFolder(CopyFold_My.java:36)
at com.itheima.CopyFold_My.copyFolder(CopyFold_My.java:36)
at com.itheima.CopyFold_My.main(CopyFold_My.java:19)
为什么会出现这种错误呢?