ArrayList<String> list = new ArrayList<String>() invalid? [message #77348] |
Mon, 13 June 2005 05:21  |
Eclipse User |
|
|
|
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 #77421 is a reply to message #77378] |
Mon, 13 June 2005 09:27  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.07707 seconds