Skip to main content



      Home
Home » Newcomers » Newcomers » ArrayList<String> list = new ArrayList<String>() invalid?
ArrayList<String> list = new ArrayList<String>() invalid? [message #77348] Mon, 13 June 2005 05:21 Go to next message
Eclipse UserFriend
Originally posted by: lehmann-mapson.cnm.de

Hello,

while my javac does have any complaints at the following line, I get
several errors within the eclipse 3.0.2 editor:

ArrayList<String> list = new ArrayList<String>();

Error:

Severity Description Resource In Folder Location Creation
Time
2 Syntax error on token "(", invalid Expression Pets.java
newsletter/WEB-INF/src/de line 57 12. Juni 2005 22:48:44
2 Syntax error on token "<", ( expected Pets.java
newsletter/WEB-INF/src/de line 57 12. Juni 2005 22:48:44
2 Syntax error on token "<", invalid AssignmentOperator Pets.java
newsletter/WEB-INF/src/de line 57 12. Juni 2005 22:48:44
2 Syntax error on token "=", != expected Pets.java
newsletter/WEB-INF/src/de line 57 12. Juni 2005 22:48:44

I guess this is caused because eclipse is not checking against jdk 1.5
syntax, but 1.4 or previous. How can I switch the workspace to 1.5
compatibility? Another newsgroup poster mentioned to hit "quick fix" so
eclipse would suggest to switch automatically, but in my workspace it
simply says "No corrections available". Any idea?

Regards
Marten
Re: ArrayList<String> list = new ArrayList<String>() invalid? [message #77362 is a reply to message #77348] Mon, 13 June 2005 05:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lehmann-mapson.cnm.de

I ment:

while my javac does _not_ have any complaints ...
Re: ArrayList<String> list = new ArrayList<String>() invalid? [message #77378 is a reply to message #77362] Mon, 13 June 2005 05:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lehmann-mapson.cnm.de

Hi,

I looked at the preferences, but at Java -> Compiler -> Compliance and
Classfiles I can only choose between "Compiler compliance level" 1.3 and
1.4, not 1.5.

Regards
Marten
Re: ArrayList<String> list = new ArrayList<String>() invalid? [message #77421 is a reply to message #77378] Mon, 13 June 2005 09:27 Go to previous message
Eclipse UserFriend
Originally posted by: myersj.gmail.com

Marten,

Eclipse 3.0.* does not support Java 1.5. Please try Eclipse 3.1*

- Jeff

Marten Lehmann wrote:
> Hi,
>
> I looked at the preferences, but at Java -> Compiler -> Compliance and
> Classfiles I can only choose between "Compiler compliance level" 1.3 and
> 1.4, not 1.5.
>
> Regards
> Marten
Previous Topic:Profiler for Eclipse3.1
Next Topic:jsp and jsf support?
Goto Forum:
  


Current Time: Sun May 11 09:08:37 EDT 2025

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

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

Back to the top