1
不知道这种帮助是否被接受要求在这里,告诉我,如果它不是。有人可以帮我调试我的应用程序(不是很大)吗?
它必须在明天之前完成,它并没有完全完成,但现在应该可以工作。我试图使用Eclipse调试器(不太习惯它)。
好的,我在另一个项目文件夹中有一个名为“调试”的旧类,这是一个调试测试。我没有给它这个名字,这是一个任务。这似乎导致一些问题,删除它,现在我的堆栈跟踪更小。
我试过调试板构造函数,将构造函数中的原始代码添加到方法中,并尝试在构造函数中运行该方法。哪些没有任何区别,但仍然。
现在的堆栈跟踪看起来是这样的:
Thread [main] (Suspended)
Board(Object).<init>() line: 20
Board.<init>() line: 9
Game.<init>() line: 15
Game.main(String[]) line: 11
板构造:
公共类局{
private int COLUMNS = 8;
private int ROWS = 8;
private Square[][] grid;
public Board(){
addGrid();
}
public void addGrid(){
grid = new Square[COLUMNS][ROWS];
for(int row = 0; row < 8; row++){
for(int col = 0; col < 8; col++){
grid[col][row] = new Square(this);
}
}
}
广场构造:
public class Square {
private Piece piece;
private Board board;
public Square(Board b){
board = b;
}
中的M Ÿ断点我注意到了这一点:
ArrayIndexOutOfBoundsException: caught and uncaught
又试了一次,得到了像以前类似的东西:
Thread [main] (Suspended)
ClassNotFoundException(Throwable).<init>(String, Throwable) line: 217
ClassNotFoundException(Exception).<init>(String, Throwable) line: not available
ClassNotFoundException.<init>(String) line: not available
URLClassLoader$1.run() line: not available
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
Launcher$ExtClassLoader(URLClassLoader).findClass(String) line: not available
Launcher$ExtClassLoader.findClass(String) line: not available
Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: not available
Launcher$AppClassLoader.loadClass(String, boolean) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available
Board.addGrid() line: 14
Board.<init>() line: 10
Game.<init>() line: 15
Game.main(String[]) line: 11
我们可以有更多的代码吗? – 2011-01-13 23:54:12
当然,我添加了理事会课程的第一部分。我尝试从断点开始,在董事会构造函数的第一行。它给了我几乎相同的例外。 – 2011-01-14 00:00:25