Problem With jdk8 on Linux


I have two problems with (latest) Idea on Linux. Both are related to JDK8 specific features.

The first problem is that code using Collectors.joining(...) doesn't compile.

The code I tried to compile is this piece from Oracle's documentation:

String joined =
                .collect(Collectors.joining(", "));

Cannot find symbol, method joining(java.lang.String)

It compiles just fine on Windows, and in Netbeans on Linux. Other collectors I've tried work just fine.

The second problem is related to Nashorn - I can't iterate a Map in javascript. Call to 'print' in example below is never called:

function iterateMap(map){
    for(var m in map){
        print("iterating map...");

(print (map.size()) prints the size of map as expected, and the map is not empty, btw).

This too does work in Netbeans (and IDEA on Windows).

Thanks in advance for any suggestions how to fix this.

1 comment
Comment actions Permalink

I'm sorry :/ I had an old, beta version of jdk8 set as project SDK :/


Please sign in to leave a comment.