Kepler Service Release 2 and Java 8 support [message #1403923] |
Mon, 28 July 2014 15:25 |
Duncan Lyall Messages: 2 Registered: July 2014 |
Junior Member |
|
|
Ubuntu Linux 12.04
jdk1.8.0_11
Kepler Service Release 2
followed instructions at
http://www.eclipse.org/downloads/java8/
and installed
Java 8 support for Eclipse Kepler SR2
jdk1.8.0_11 shown and selected in Installed JREs
Compiler compliance level set to 1.8
everything else I can find that has anything to do
with the Java version is also set to 1.8
I have the following code
Integer foo[] = {1, 3, 2, 9, 6, 0, 8, 7, 7, 8, 5, 11, 87, 23, 6};
java.util.List<Integer> il = java.util.Arrays.asList(foo);
java.util.stream.Stream<Integer> s = il.stream();
Eclipse recognizes java.util.Stream as existing
but gives the following error
"the method stream is undefined for the type List<Integer>"
interface List implements interface Collection which provides the method stream() according the API docs.
Is this a bug or am I doing something stupid, it's my first real look at streams so please excuse any stupidity on my part.
thanks
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09100 seconds