My code runs and creates the proper output but after a few minutes it will give an error saying, "Command exited with non-zero status 1."
I don't understand this error since the code gives me the answer I want.

public class Main{

public static void main(String[] args){
for(int i=0; i<num; i++){
for(int j=0; j<num; j++){
chessboard[i][j]=-1;
}
}
tour(0,7,3);
}
static int num=8;
static int chessboard[][] = new int[num][num];
static int[] x = {-2, -1, 1, 2, 2, 1, -1, -2};
static int[] y = {1, 2, 2, 1, -1, -2, -2, -1};

static boolean tour(int advance, int horizontal, int vertical){
boolean a = true;
chessboard[horizontal][vertical] = advance;
if(advance==63){
for(int i=0; i<num; i++){
for(int j=0; j<num; j++){
System.out.printf("%5d", chessboard[i][j]);
}
System.out.println("\n");
}
}
else{
for(int i=0; i<num; i++){
if((horizontal+x[i]<num & (vertical+y[i])>=0
& (vertical+y[i])<num) & (horizontal+x[i])>=0){
if(chessboard[horizontal+x[i]][vertical+y[i]]==-1){
if(tour(advance+1, (horizontal+x[i]), (vertical+y[i]))){
break;
}
}
}
}
a=false;
chessboard[horizontal][vertical]= -1;
}
return a;
}
}

--- Update ---

Each time I run it, it tells me that a different amount of operations were killed, ex. Line 3: 2170 Killed java -Xmx256m Main