org.gradle.tooling throws an exception trying to find the java executable inside the IDEA application bundle. It seems to be looking for it at a slightly incorrect path. Specifically, it is looking for it at this path:
/Applications/IntelliJ IDEA 2017.3.app/Contents/jdk/Contents/Home/bin/java
But it seems to actually exist at this path (note the jre path component):
/Applications/IntelliJ IDEA 2017.3.app/Contents/jdk/Contents/Home/jre/bin/java
System version info:
gradle-view 3.0.0
IntelliJ IDEA 2017.3.2 (Ultimate Edition)
Build #IU-173.4127.27, built on December 25, 2017
JRE: 1.8.0_152-release-1024-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.9.5
Details
directory layout inside IntelliJ
summary
$ ls -1F '/Applications/IntelliJ IDEA 2017.3.app/Contents/jdk/Contents/Home/bin/java'
ls: /Applications/IntelliJ IDEA 2017.3.app/Contents/jdk/Contents/Home/bin/java: No such file or directory
$ ls -F '/Applications/IntelliJ IDEA 2017.3.app/Contents/jdk/Contents/Home/jre/bin/java'
java*
Build
org.gradle.tooling.GradleConnectionException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.4-bin.zip'.
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:55)
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter.run(DefaultBuildActionExecuter.java:60)
at com.github.rholder.gradle.dependency.DependencyConversionUtil.loadProjectDependenciesFromModel(DependencyConversionUtil.java:109)
at com.github.rholder.gradle.intellij.DependencyViewer$1$1.doInBackground(DependencyViewer.java:106)
at com.github.rholder.gradle.intellij.DependencyViewer$1$1.doInBackground(DependencyViewer.java:103)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.gradle.internal.jvm.JavaHomeException: The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: /Applications/IntelliJ IDEA 2017.3.app/Contents/jdk/Contents/Home/bin/java
at org.gradle.internal.jvm.Jvm.findExecutable(Jvm.java:130)
at org.gradle.internal.jvm.Jvm.getJavaExecutable(Jvm.java:151)
at org.gradle.internal.jvm.Jvm.forHome(Jvm.java:110)
at org.gradle.launcher.daemon.configuration.DaemonParameters.getEffectiveJavaExecutable(DaemonParameters.java:100)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:73)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:109)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:87)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:117)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:77)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:44)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:31)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:62)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:34)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:113)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:107)
at org.gradle.tooling.internal.provider.DefaultConnection.run(DefaultConnection.java:186)
at org.gradle.tooling.internal.consumer.connection.CancellableConsumerConnection$CancellableActionRunner.run(CancellableConsumerConnection.java:99)
at org.gradle.tooling.internal.consumer.connection.AbstractConsumerConnection.run(AbstractConsumerConnection.java:62)
at org.gradle.tooling.internal.consumer.connection.ParameterValidatingConsumerConnection.run(ParameterValidatingConsumerConnection.java:53)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter$1.run(DefaultBuildActionExecuter.java:71)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:84)
at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
... 3 more
java.lang.RuntimeException: org.gradle.tooling.GradleConnectionException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.4-bin.zip'.
at com.github.rholder.gradle.dependency.DependencyConversionUtil.loadProjectDependenciesFromModel(DependencyConversionUtil.java:115)
at com.github.rholder.gradle.intellij.DependencyViewer$1$1.doInBackground(DependencyViewer.java:106)
at com.github.rholder.gradle.intellij.DependencyViewer$1$1.doInBackground(DependencyViewer.java:103)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.gradle.tooling.GradleConnectionException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.4-bin.zip'.
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:55)
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter.run(DefaultBuildActionExecuter.java:60)
at com.github.rholder.gradle.dependency.DependencyConversionUtil.loadProjectDependenciesFromModel(DependencyConversionUtil.java:109)
... 8 more
Caused by: org.gradle.internal.jvm.JavaHomeException: The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: /Applications/IntelliJ IDEA 2017.3.app/Contents/jdk/Contents/Home/bin/java
at org.gradle.internal.jvm.Jvm.findExecutable(Jvm.java:130)
at org.gradle.internal.jvm.Jvm.getJavaExecutable(Jvm.java:151)
at org.gradle.internal.jvm.Jvm.forHome(Jvm.java:110)
at org.gradle.launcher.daemon.configuration.DaemonParameters.getEffectiveJavaExecutable(DaemonParameters.java:100)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:73)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:109)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:87)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:117)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:77)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:44)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:31)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:62)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:34)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:113)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:107)
at org.gradle.tooling.internal.provider.DefaultConnection.run(DefaultConnection.java:186)
at org.gradle.tooling.internal.consumer.connection.CancellableConsumerConnection$CancellableActionRunner.run(CancellableConsumerConnection.java:99)
at org.gradle.tooling.internal.consumer.connection.AbstractConsumerConnection.run(AbstractConsumerConnection.java:62)
at org.gradle.tooling.internal.consumer.connection.ParameterValidatingConsumerConnection.run(ParameterValidatingConsumerConnection.java:53)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter$1.run(DefaultBuildActionExecuter.java:71)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:84)
at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
... 3 more
Summary
org.gradle.tooling
throws an exception trying to find thejava
executable inside theIDEA
application bundle. It seems to be looking for it at a slightly incorrect path. Specifically, it is looking for it at this path:But it seems to actually exist at this path (note the
jre
path component):System version info:
gradle-view 3.0.0
Details
directory layout inside IntelliJ
summary
full
Full Exception