Reputation: 18572
I installed java 8 on Lubuntu 13.10. It is pre release but it should work - JDK™ 8 Early Access Releases.
I added JDk to eclipse:
And tried wrote first java 8 version code.
This code should find the longest word.
I caught a bunch of exceptions:
for 12
line - it shows:
Multiple markers at this line - Syntax error, parameterized types are only available if source level is 1.5 or greater - Resource specification not allowed here for source level below 1.7
Why does this exactly happen?
How to solve this trouble?
Upvotes: 2
Views: 1166
Reputation: 1785
Eclipse JDT environment -- editors and tools -- only supports Java Syntax up to 1.7. As of today, Java 1.8 support is only available in early access releases.
Adding a JDK or JRE to Eclipse does no change the characteristics of the JDT environment, which is a highly-integrated set of tools. So, until Eclipse releases Java 1.8 support and that makes its way into your distribution, you will not be able to use the Java editor for any syntax that is unique to Java 1.8.
Upvotes: 1