openvenues / jpostal

Java/JNI bindings to libpostal for for fast international street address parsing/normalization
MIT License
106 stars 44 forks source link

Cannot Assemble #39

Open tbrodbeck opened 4 years ago

tbrodbeck commented 4 years ago

This the assemble command yields an error:

./gradlew assemble --stacktrace  

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '11.0.9'.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
java.lang.IllegalArgumentException: Could not determine java version from '11.0.9'.

My OS:

$ neofetch -off
OS: macOS Big Sur 11.0.1 20B29 x86_64 
Host: MacBookPro15,1 
Kernel: 20.1.0 
Uptime: 2 days, 23 hours, 32 mins 
Packages: 171 (brew) 
Shell: zsh 5.8 
Resolution: 1680x1050@2x, 3840x1600@2x, 1050x1680@2x 
DE: Aqua 
WM: Quartz Compositor 
WM Theme: Blue (Dark) 
Terminal: vscode 
CPU: Intel i7-8850H (12) @ 2.60GHz 
GPU: Intel UHD Graphics 630, Radeon Pro 560X 
Memory: 12592MiB / 16384MiB 
$ java --version       
openjdk 11.0.9 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9+11)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.23.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20201023_788 (JIT enabled, AOT enabled)
OpenJ9   - 0394ef754
OMR      - 582366ae5
JCL      - 3b09cfd7e9 based on jdk-11.0.9+11)
$ gradle --version                   

------------------------------------------------------------
Gradle 6.7.1

Tried it with IntelliJ as well for good measure:

Cannot determine classpath for resource 'java/sql/SQLException.class' from location 'jrt:/java.sql/java/sql/SQLException.class'.

The project uses Gradle 2.9 which is incompatible with IDEA running on Java 10 or newer.
See details at https://github.com/gradle/gradle/issues/8431
Possible solution:
 - Upgrade Gradle wrapper to 4.8.1 version and re-import the project
cgivre commented 3 years ago

I'm having this issue as well. :-(

SahibYar commented 1 year ago

This is because Gradle is not recognizing your Java version. Please upgrade gradle version in gradle/wrapper/gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip

^ This worked for me. My Java version was 11.0.19

You can check Gradle/Java compatibility from this Table