SpencerPark / IJava

A Jupyter kernel for executing Java code.
MIT License
1.07k stars 211 forks source link

IJava % ./gradlew installKernel failed #129

Open aaazzz640 opened 2 years ago

aaazzz640 commented 2 years ago

hi all,

I tried to setup the IJava based on the instructions however, after running cd IJava

then run $ chmod u+x gradlew && ./gradlew installKernel i got the problem like this:

FAILURE: Build failed with an exception.

BUILD FAILED in 0s

Mine is es macos system and just got java 17 installed.

what might be the solution... many thanks :)

mjw99 commented 2 years ago

With --stacktrace and Ubuntu 20.04.3 and openjdk-17, I see:

...
Caused by: java.lang.IllegalAccessException: module java.base does not open java.lang to unnamed module @4d154ccd
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        ... 95 more

With openjdk-11, I do not see the error above. Hence this is probably related to openjdk-17

hanslovsky commented 2 years ago

Java 17 is supported only by gradle versions 7.3+. I created SpencerPark/Jupyter-kernel-installer-gradle#14 and SpencerPark/IJava#134 to bump gradle version to 7.4.2.