J'ai une erreur lorsque je compile:
j'utilise netbean5.5
Code de ma foncton:
public Pizza listAll()
{
String PizzaNom, PizzaIngredient, PizzaPrix;
try
{
Statement statement = connection.createStatement();
String query = "SELECT * FROM TABLE_PIZZA";
ResultSet rs = statement.executeQuery(query);
Pizza b = new Pizza();;
Collection<Pizza> pizza = new Vector<Pizza>();
while(rs.next())
{
//Pizza b = new Pizza();
b.setNom(rs.getString("pizza"));
b.setIngredient(rs.getString("ingredient"));
b.setPrix(rs.getString("prix"));
//boisson.add(b);
}
statement.close();
System.out.println("----------------------------------------");
return b;
}
catch (Exception e)
{
e.printStackTrace();
}
return null;
}
--------------------erreur-------------------init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
Compiling 1 source file to C:\Documents and Settings\Sebastien\Ebouff55700\build\web\WEB-INF\classes
C:\Documents and Settings\Sebastien\Ebouff55700\src\java\com\myapp\struts\HSQLConnection.java:121: generics are not supported in -source 1.4
(use -source 5 or higher to enable generics)
Collection<Pizza> pizza = new Vector<Pizza>();
1 error
C:\Documents and Settings\Sebastien\Ebouff55700\nbproject\build-impl.xml:295: The following error occurred while executing this line:
C:\Documents and Settings\Sebastien\Ebouff55700\nbproject\build-impl.xml:149: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)
Si quelqu'un à une idée...
Partager