Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

VerifyError message

  Asked By: Mada    Date: May 07    Category: Java    Views: 578
  

I am writing a checkers game for a class project and am stumped by a
bizarre error I cannot figure out.

My main class called Game, creates a board made up of Square objects.
The Square class extends JButton (because I want to associate the
Square's location on the board with two private variables (row and col)
in that class).

The constructors for Square are:

public class Square extends JButton

{
// class fields
private String pieceColor;
private boolean King;
private int row, col;
public Square()
{
super();
}
public Square(Icon Ic, int r, int c)
{
super(Ic);
row = r;
col = c;
pieceColor = "Blank";
King = false;
}


The Game class creates Square objects with the following code:

for(int j=0;j<8;j++)
{
Board[i][j]= new Square(blank,i,j);
.....

where blank is an Icon object.

Both classes compile just fine, but when I try to run the Game class, I
get this error:

----jGRASP exec: java checkers.Game

java.lang.VerifyError: (class: checkers/Game, method: <init> signature:
()V) Incompatible argument to function
Exception in thread "main"
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.

I checked the API, but the documentation is not extensive for this
error. I am stumped.

Any thoughts or suggestions would be greatly appreciated.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on VerifyError message Or get search suggestion and latest updates.




Tagged: