Solving “Could not determine Java version from ‘9.0.1’” with Gradle and IntelliJ on MacOSX

Solving “Could not determine Java version from ‘9.0.1’” with Gradle and IntelliJ on MacOSX

Solution To Gradle Error

As I was importing Gradle project to try out Java Spring, I encountered this error:

Gradle complete project refresh failed 

Error:Could not determine java version from 9.0.1.

I found this blog by Johan Haleby on same subject useful. But the solution #1 didn’t work. While I was on Project Structure settings (File -> Project Structure -> Project), I noticed the Project SDK was 9.0. This seemed odd as mine was 9.0.1.

So, I clicked on Edit, which took me to SDKs settings and updated the name to 9.0.1.

Solving Not Determine Java Version 9-0-1 Gradle Intellij Macosx

It worked.

Hope this helps if you are in situation like mine.

Installing Gradle

Just some basic noted on installing Gradle on Mac OS X.

$ /usr/bin/ruby -e "$(curl -fsSL"
$ brew update && brew install gradle
$ which gradle
$ ls /usr/local/Cellar/gradle/4.3.1/

Connecting Gradle & IntelliJ IDEA

While importing a Gradle project, I added following as Gradle path:


Then as suggested by various stackoverflow articles, I refreshed Gradle (View -> Tool Windows -> Gradle).


A Request: Support

Time and effort has gone into the creation of this content. If it has brought you any benefit, be an encourager and support our work. Your contribution enables creation of more free tools and useful content. Any help is appreciated and we will thank you personally. Do share with your friends how you supported independent content creation. Anyway, thankful for all the support.

Dinker Charak

Dinker has over a decade of experience in building products across diverse domains as Industrial Automation, Home Automations, Operating Systems, High Energy Particle Physics, Embedded Systems, Online Video Advertising, Messaging, K-12 education and Private Banking. He also founded Gungroo Software. His books #ProMa, Absolute and None & The Murmurs of the Dawn are available on Amazon.
Close Menu