Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: How to compile with Java 9? #5

Closed
nikos opened this issue Oct 1, 2017 · 1 comment
Closed

Q: How to compile with Java 9? #5

nikos opened this issue Oct 1, 2017 · 1 comment

Comments

@nikos
Copy link

nikos commented Oct 1, 2017

Compiling and running the demo with Java 8 is fine, but as soon as Java 9 I encounter the following error:

./gradlew bootRun

> Configure project :
e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
    class org.gradle.api.Project, unresolved supertypes: Comparable<Project>
    class org.gradle.api.plugins.ExtensionAware, unresolved supertypes: Object
    class org.gradle.api.plugins.PluginAware, unresolved supertypes: Object
    class groovy.lang.Closure, unresolved supertypes: Cloneable, Runnable, Serializable
    class groovy.lang.GroovyObjectSupport, unresolved supertypes: Object
    class groovy.lang.GroovyObject, unresolved supertypes: Object
    class groovy.lang.GroovyCallable, unresolved supertypes: Callable<V>
    class org.gradle.api.Action, unresolved supertypes: Object
    class org.gradle.api.NamedDomainObjectFactory, unresolved supertypes: Object
    class org.gradle.api.initialization.dsl.ScriptHandler, unresolved supertypes: Object
    class org.gradle.api.NamedDomainObjectList, unresolved supertypes: List<T>
    class org.gradle.api.DomainObjectCollection, unresolved supertypes: Collection<T>
    class org.gradle.util.Configurable, unresolved supertypes: Object
    class org.gradle.api.artifacts.dsl.DependencyHandler, unresolved supertypes: Object



FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'spring-boot-kotlin-demo'.
> Could not open cache directory 7ooj87our40tvw5ni3o9390ur (/Users/niko/.gradle/caches/4.2/gradle-kotlin-dsl/7ooj87our40tvw5ni3o9390ur).
   > Internal error: unable to compile script, see log for details

my environment looks like:

./gradlew --version

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/Users/niko/.gradle/wrapper/dists/gradle-4.2-bin/cl9xe1l8k8ophj72k8rv6xbu7/gradle-4.2/lib/groovy-all-2.4.11.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

------------------------------------------------------------
Gradle 4.2
------------------------------------------------------------

Build time:   2017-09-20 14:48:23 UTC
Revision:     5ba503cc17748671c83ce35d7da1cffd6e24dfbd

Groovy:       2.4.11
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          9 (Oracle Corporation 9+181)
OS:           Mac OS X 10.11.6 x86_64
@sdeleuze sdeleuze mentioned this issue Nov 9, 2017
@dsebastien
Copy link

I've got the same issue with my maven-based spring boot 2 (M7)/kotlin project and indeed it's an issue with Java 9 only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants