Is Java 9 supported?

Dear guru,

I am wondering whether Buildship supports Java 9? I’ve just tried to build project with Java 9 and Buildship added not existing ‘JavaSE-1.9’ library to the project libraries. Is it possible to correct this behavior?

Thanks in advance,
Vadim

1 Like

I managed to solve the problem partially. The following code fixes classpath entry but doesn’t work for ‘prefs’. Everything works when ‘eclipseJdt’ task is invoked directly but failed when ‘Refresh Gradle project’ menu item is selected (default ‘prefs’ is generated). Please advice.

    eclipse {
        jdt {
            javaRuntimeName = "JavaSE-9"
            file.withProperties { p ->
                p['org.eclipse.jdt.core.compiler.compliance'] = '9'
                p['org.eclipse.jdt.core.compiler.source'] = '9'
                p['org.eclipse.jdt.core.compiler.codegen.targetPlatform'] = '9'
            }
        }
    }

Vadim

@vlotarev please open a bug report, this needs to be fixed in Gradle.

Stefan,

Will do. At the moment wouldn’t you advice any workaround? I am wondering why withProperties doesn’t work with Buildship?

Thanks,
Vadim