哪位大神能运行一下下面的代码么 ,这代码除了有个内部类,应该没什么特别的了>_< google了很久米有解决诶。java.lang.NoSuchMethodError: main
Exception in thread "main" 
import java.util.Stack;public class Maze 
{
private static byte maze[][] = new byte[12][12];
//private int m_col,m_row;
private static Stack path;
private static int size = 10;// size=row=col

public static void main(String[] args) 
{
// TODO Auto-generated method stub
Maze maze1 = new Maze();
maze1.inputMaze();
if(maze1.findPath())
System.out.println("Find Path!");
//outputPath();
else
System.out.println("No Path!");
}

//内部类
static class Position
{
private int col;// = m_col;
private int row;// = m_row;
public Position(int i, int j) 
{
// TODO Auto-generated constructor stub
row = i;
col = j;
}
} private static void inputMaze()
{
byte maze[][] =
{
{0,1,1,1,1,1,0,0,0,0},
{0,0,0,0,0,1,0,1,0,0},
{0,0,0,1,0,1,0,0,0,0},
{0,1,0,1,0,1,0,1,1,0},
{0,1,0,1,0,1,0,1,0,0},
{0,1,1,1,0,1,0,1,0,1},
{0,1,0,0,0,1,0,1,0,1},
{0,1,0,1,1,1,0,1,0,0},
{1,0,0,0,0,0,0,1,0,0},
{0,0,0,0,1,1,1,1,0,0}
};
}

private static boolean findPath()
{
path = new Stack();

//initialize offsets
Position [] offset = new Position [4];
offset[0] = new Position(0,1); //right
offset[1] = new Position(1,0); //down
offset[2] = new Position(0,-1); //left
offset[3] = new Position(-1,0); //up

//initialize wall of obstacles around maze
for(int i = 0; i <= size + 1; i++)
{
maze[0][i] = maze[size+1][i] = 1;
maze[i][0] = maze[i][size+1] = 1;
}

Position here = new Position(1,1);//entrsnce
maze[1][1] = 1; //prevent return to entrance.
int option = 0; //next move
//int lastOption = 3;

//search for a path
while(here.row!=size || here.col!=size)
{
//not at exit , find a neighbor to move to
int r = 0,c = 0;
while(option <= 3)
{
r = here.row + offset[option].row;
c = here.col + offset[option].col;
if(maze[r][c] == 0)
break;
option++;
}

//was a neighbor found?
if(option <= 3) //yes
{
//move to maze[r][c]
path.push(here);
here = new Position(r,c);
maze[r][c] = 1;
option = 0;
}
else 
{
if(path.empty())
return false;
Position next = (Position)path.pop();
if(next.row == here.row)
option = 2 + next.col - here.col;
else
option = 3 + next.row - here.row;
here = next;
}
}
return true; //at exit
}

//private static void outputPath()
//{

//}
}