package com.graduatestudent.dao;import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import com.graduatestudent.model.CommiteeMember;
import com.graduatestudent.model.LogInfo;
import com.graduatestudent.model.ReviewExpert;
import com.graduatestudent.model.Thesis;
import com.graduatestudent.model.Tutor;
import com.graduatestudent.jdbc.JDBC;public class TutorDAO {
private static TutorDAO tutorDao=new TutorDAO();

private TutorDAO(){}

public static TutorDAO getInstance(){
return tutorDao;
}
public List<Thesis> getThesis(String thesisNo) {
String sql="select * from thesis";
System.out.println(sql);
List<Thesis> l= new ArrayList<Thesis>();
Thesis thesis=null;
ResultSet rs=JDBC.getInstance().executeSQL(sql);
try {

while(rs.next()){
thesis=new Thesis();
thesis.setThesisNo(rs.getString(1));
thesis.setDegreeApplicantNo(rs.getString(2));
thesis.setChineseTitle(rs.getString(3));
thesis.setEnglishTitle(rs.getString(4));
thesis.setChineseAbstract(rs.getString(5));
thesis.setEnglishAbstract(rs.getString(6));
thesis.setChineseKeywords(rs.getString(7));
thesis.setEnglishKeywords(rs.getString(8));
thesis.setCreativeIdea(rs.getString(9));
thesis.setFile(rs.getString(10));
l.add(thesis);
}

} catch (SQLException e) {
e.printStackTrace();
}
JDBC.getInstance().close();
return l;
}
}
请问我的Myeclipse为什么不能识别List啊!我已经设置了jdk版本了,网上找了N多个答案都不行,哪位高手可以解决一下,谢谢!

解决方案 »

  1.   

    是不是你的jdk的版本有误呀   你试着换换jdk的版本试试
      

  2.   

    parameterized types are only available if source lever is 5.0
    这是错误提示,可是我已经将jdk设置成自己安装的新版本了,还是报错!
      

  3.   

    你的tomcat和myeclips的JDK版本不一样吧,你查一下,如果不一样换成同一个JDK
      

  4.   

    支持楼上的观点  你的jdk版本不一致
      

  5.   

    我看你代码里有 泛型 那肯定是用到 5.0 的了 你把 JDK版本设置为 5.0 或者 6.0 看看。
      

  6.   

    不要用myeclips自带的JDK,用自己安装的
    tomcat也是
      

  7.   

    你jdk装新的,但可以编译你项目的jdk是1.4之类的,手工指定看看,到选项里找java编辑-->启用特定项目设置