Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] Java source level compliance

Hi,

I am running into problems when switching from java 1.4 to 5.0, so I would
be able to use generics. I am using hibernate synchronizer to generate my
java source files, and the latest version used java generics by default. I changed my
source level compliance to  5.0 in preferences>java>compiler, keeping all other defaults. When running my
plugins right from within eclipse, everything goes fine, but if I deploy them to a jar
and start eclipse (and my plugins) normally, I get these errors everywhere.

java.lang.Error: Unresolved compilation problems:
 The type List is not generic; it cannot be parameterized with arguments
<MyType>
 Syntax error, parameterized types are only available if source level is 5.0

But I changed the source level to 5.0 for eclipse default, and even set my
project defaults to 5.0.

I chnanged most of mmy code to se generics, but not all of them (is this
even necessary). For collections that contain multiple types of objects, I
use List<Object> instead.

There is only one JRE installed (1.5), and I see this in the log files as
well.

Has anyone seen these problems before?

Regards,
Leen Toelen


Back to the top