java - 调试时Eclipse中的“找不到源”错误
问题描述
我是 Java 新手。
我有一个迷宫解决程序,但我得到了一个
找不到来源
调试程序时出错。我几乎尝试了一切,但没有成功。我不能再详细说明这个问题了。
这是我的主要代码:
File file=new File("C:\\Users\\jan\\Desktop\\maze2.txt");
Scanner sc=new Scanner(file);
int count=sc.nextInt();
System.out.println(file.exists());
System.out.println(file.canRead());
Maze[] mazes=new Maze[count];
for(int i=0;i<count;i++) {
mazes[i]=new Maze(sc.nextInt(),sc.nextInt());
mazes[i].makeMatrix(sc);
mazes[i].solve();
}
我也进进出出true
。
我怎样才能解决这个问题?file.exists()
file.canRead()
解决方案
推荐阅读
- go - Heroku 丢失 GeoTrust Global CA 根证书
- python - Pandas 系列 to_numpy() 保留索引的名称
- r - 转置行、列和组
- android - 滑动打开反应原生导航抽屉
- project - LED显示板项目
- python - 按降序排序 Django
- go - 无法解码凯撒加密的消息
- javascript - Javascript webkitAudioContext 在 Safari 中没有播放
- mysql - 从在相同或不同容器中运行的 R 程序持久插入到在容器中运行的 MySQL 数据库
- excel - 如何修复 Alteryx 的 New-Object Com 类错误?