首页 > 解决方案 > 调试时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()

标签: javaeclipseclassdebugging

解决方案


推荐阅读