Eclipse 3.1M5a and J2SE 5.0: "Syntax error, varargs are only available if source level is 5.0& [message #197346] |
Wed, 02 March 2005 03:56 |
Eclipse User |
|
|
|
Originally posted by: anony_java.anon.foobar
I recently upgraded from Eclipse 3.1M4 to Eclipse 3.1M5a
My workspace contains a Java project. The project contains Java source
files that utilize J2SE 5.0 language features: varargs and generics.
I am unable to get the source files to compile in Eclipse 3.1M5a
These are the errors reported by Eclipse:
Syntax error, varargs are only available if source level is 5.0
Syntax error, parameterized types are only available if source level is 5.0
The type List is not generic; it cannot be parameterized with arguments
<Row>
I've already enabled project-specific Java Compiler settings. I set
Compiler compliance to 5.0, Source compatibility to 5.0, and
Generated .class compatibility to 5.0
When I was using Eclipse 3.1M4, everything was fine.
Am I missing something?
|
|
|
|
Re: Eclipse 3.1M5a and J2SE 5.0: "Syntax error, varargs are only available if source level i [message #197600 is a reply to message #197346] |
Thu, 03 March 2005 21:06 |
Michael Olan Messages: 20 Registered: July 2009 |
Junior Member |
|
|
It was just the opposite for me. In 3.1 M4 I couldn't use varargs. When
I made the changes you mentioned, it would accept vararg, but a
"foreach" loop to process them would not compile. When I switched to 3.1
M5a, it works ok.
Anony wrote:
>
> I recently upgraded from Eclipse 3.1M4 to Eclipse 3.1M5a
>
> My workspace contains a Java project. The project contains Java source
> files that utilize J2SE 5.0 language features: varargs and generics.
>
> I am unable to get the source files to compile in Eclipse 3.1M5a
>
> These are the errors reported by Eclipse:
>
>
> Syntax error, varargs are only available if source level is 5.0
>
> Syntax error, parameterized types are only available if source level is 5.0
>
> The type List is not generic; it cannot be parameterized with arguments
> <Row>
>
>
>
> I've already enabled project-specific Java Compiler settings. I set
> Compiler compliance to 5.0, Source compatibility to 5.0, and
> Generated .class compatibility to 5.0
>
> When I was using Eclipse 3.1M4, everything was fine.
>
> Am I missing something?
>
|
|
|
Powered by
FUDForum. Page generated in 0.02345 seconds