Bom dia
To usando jdk1.6.0_02+netbeans 5.5+Generics ao compilar meu arquivo o netbeans da a seguinte mensagem:
[color=red]deps-ear-jar:
deps-jar:
Compiling 1 source file to C:\estudos\TrabComPadroes\build\web\WEB-INF\classes
C:\estudos\TrabComPadroes\src\java\br\com\integrator\dao\AutoresDAO.java:97: generics are not supported in -source 1.4
(use -source 5 or higher to enable generics)
List list = new ArrayList();
1 error
C:\estudos\TrabComPadroes\nbproject\build-impl.xml:323: The following error occurred while executing this line:
C:\estudos\TrabComPadroes\nbproject\build-impl.xml:149: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 3 seconds)[/color]
meu código abaixo:
[code]public list todosAutores() throws Exception{
PreparedStatement ps = null;
Connection conn = null;
ResultSet rs = null;
try{
conn = this.conn;
ps = conn.prepareStatement("SELECT * from autores");
rs = ps.executeQuery();
List<Autores> list = new ArrayList<Autores>();
while(rs.next()) {
Integer autorId = rs.getInt(1);
String nome = rs.getString(2);
String email = rs.getString(3);
Date nascimento = rs.getDate(4);
list.add(new Autores(autorId, nome, email, nascimento));
}
return list;
}catch (SQLException sqle){
throw new Exception(sqle);
}finally{
ConnectionFactory.closeConnection(conn, ps, rs);
}
}[/code]
Ja vasculhei tudo no netbeans e sempre apontando para a jdk1.6.0_02
Desde já agradeço a atenção de todos