Installation Trouble

Hello,
I am having issues getting started with Gradle.

I have gradle-6.7.1 installed to C:\Gradle\

echo %GRADLE_HOME%
C:\Gradle\gradle-6.7.1
echo %PATH%
…;C:\Gradle\gradle-6.7.1\bin;…
gradle -v

(No really, it runs for a bit but doesn’t output anything)

set DEBUG=TRUE
gradle -v

“C:\Program Files\AdoptOpenJDK\jre-15.0.1.9-openj9/bin/java.exe” “-Xmx64m” “-Xms64m” “-Dorg.gradle.appname=gradle” -classpath “C:\Gradle\gradle-6.7.1\lib\gradle-launcher-6.7.1.jar” org.gradle.launcher.GradleMain -v

(Again, nothing)

if “-529697949” == “0” goto mainEnd …
java -Xmx64m -Xms64m -Dorg.gradle.appname=gradle -classpath C:\Gradle\gradle-6.7.1\lib\gradle-launcher-6.7.1.jar org.gradle.launcher.GradleMain -v

(Again, nothing but takes a hot minute)

Just hoping that it works…
Creating a gradle eclipse project
Use Local Installation Directory > “C:\Gradle\gradle-6.7.1\bin”

Summary

org.gradle.tooling.GradleConnectionException: Could not fetch model of type ‘BuildEnvironment’ using Gradle installation ‘C:\Gradle\gradle-6.7.1\bin’.
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:43)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor.lambda$run$0(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$$Lambda$701/0x000000003544e500.run(Unknown Source)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Unknown Source)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:51)
at org.gradle.tooling.internal.consumer.DefaultProjectConnection.getModel(DefaultProjectConnection.java:50)
at org.eclipse.buildship.core.internal.workspace.ConnectionAwareLauncherProxy.newBuildLauncher(ConnectionAwareLauncherProxy.java:53)
at org.eclipse.buildship.core.internal.DefaultGradleBuild.newBuildLauncher(DefaultGradleBuild.java:140)
at org.eclipse.buildship.core.internal.workspace.InitializeNewProjectOperation.initProjectIfNotExists(InitializeNewProjectOperation.java:60)
at org.eclipse.buildship.core.internal.workspace.InitializeNewProjectOperation.runInToolingApi(InitializeNewProjectOperation.java:45)
at org.eclipse.buildship.core.internal.operation.ToolingApiOperations$1.runInToolingApi(ToolingApiOperations.java:55)
at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:58)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:39)
at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:33)
at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage$4.run(ProjectPreviewWizardPage.java:311)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.lang.IllegalArgumentException: The specified Gradle installation directory ‘C:\Gradle\gradle-6.7.1\bin’ does not appear to contain a Gradle distribution.
at org.gradle.tooling.internal.consumer.DistributionFactory$InstalledDistribution.getToolingImplementationClasspath(DistributionFactory.java:181)
at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:41)
at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:44)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:104)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:86)
at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:61)
at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor.lambda$run$0(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$$Lambda$701/0x000000003544e500.run(Unknown Source)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Unknown Source)

TL;DR; Caused by: java.lang.IllegalArgumentException: The specified Gradle installation directory ‘C:\Gradle\gradle-6.7.1\bin’ does not appear to contain a Gradle distribution.

Opening in Powershell
PS C:\Gradle\gradle-6.7.1\bin> ls
-a---- 1/7/2021 8:55 AM 5758 gradle
-a---- 1/7/2021 8:55 AM 2755 gradle.bat
PS C:\Gradle\gradle-6.7.1\bin> ./gradle.bat -v
(Nothing, still)
PS C:\Gradle\gradle-6.7.1\bin> ./gradle -v
(No output again)

Could use some help =D

“GradleMain” doesn’t actually exist in the jar file and I tried changing it to Main but java yelled at me. I don’t know all the CLI commands and how they work with java but I figured I’d try before asking for help.

Windows 10 (if Powershell wasn’t a give away)

I’ve tried a few different things at this point;

  • Tried with both Hotspot and OpenJ9
  • Clean install with reboots of Gradle.

Here’s an image to show what exactly I mean.

Off topic:
I’m new here, how I can edit a post so that I can not look so pretentious with my “(No really, it runs for a bit but doesn’t output anything)” the formatting didn’t quite work to show that nothing was displayed. I didn’t see the preview window behind the welcome message when first posting. “`” instead of “>” would have been better :slight_smile:

I have a simular issue.
After some searching, I found that the most recent version I could run without issue was 6.6.1.
This is what’s displayed when I run gradle --version using gradle 6.6.1
image

More recent versions seem to run a bit, and than give no output at all. No error code, nothing.

Not sure if this should be discussed here, or in a github issue…