Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse 3.1M5a and J2SE 5.0: "Syntax error, varargs are only available if source level is 5.0&
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 Go to next message
Eclipse UserFriend
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 #197437 is a reply to message #197346] Wed, 02 March 2005 22:59 Go to previous messageGo to next message
Genady Beryozkin is currently offline Genady BeryozkinFriend
Messages: 410
Registered: July 2009
Senior Member
Maybe there is some clash between the workspace and per/project settings?

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?
>
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 Go to previous message
Michael Olan is currently offline Michael OlanFriend
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?
>
Previous Topic:Find unused public methods
Next Topic:Smart Insert Question
Goto Forum:
  


Current Time: Fri Apr 26 06:49:01 GMT 2024

Powered by FUDForum. Page generated in 0.02983 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top