运行java代码时,为什么会显示 Could not find the main class,program will exit...
怎么会出现这问题  咋解决啊

解决方案 »

  1.   

    没有找到主函数,你看看有没有main方法啊
    static void main(String []args)有没有这种方法啊.
      

  2.   

    public class TestExcel { public static void main(String[] args){
    try{
    InputStream in=new FileInputStream("e:\\123.xls");
    jxl.Workbook wbs=jxl.Workbook.getWorkbook(in);
    jxl.Sheet sheet=wbs.getSheet("0");
    int rows=sheet.getRows();
    int cols=sheet.getColumns();
    for(int i=0;i<=rows;i++){
    for(int j=0;j<=cols;j++){
      jxl.Cell cell=sheet.getCell(i, j);
      System.out.print(cell.getContents()+"\t");
    }
    System.out.println();
    }
    }catch(Exception e){
    e.printStackTrace();
    }

    }}
      

  3.   

    用的是eclipse吗!首先创建工程了吗!