redhat-developer / redhat-developer/vscode-java

Problem on Linux with GRADLE_HOME environment variable

Open
#859 1 comment 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Gradle
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

When I launch VS Code on a Java project built using Gradle, I get the following errors:

Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-5.1-bin.zip'
Could not create parent directory for lock file /usr/share/java/gradle/wrapper/dists/gradle-5.1-bin/....../gradle-5.1-bin.zip.lck

I managed to fix the problem by setting the environment variable GRADLE_HOME to ~/.gradle instead of the default /usr/share/java/gradle and cleaning the project directory.

Environment
  • Operating System: Arch Linux 5.0.4
  • JDK version: openjdk version "11.0.3" 2019-04-16
  • Visual Studio Code version: 1.32.3
  • Java extension version: Java Extension Pack 0.6.0
Steps To Reproduce
  1. Launch a Java project using Gradle 5.1
Current Result

The Java Language Server aborts.

Expected Result
Additional Informations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Java Language Server startup with a Gradle 5.1 project on Arch Linux, using the environment details in the report. Trace how the Gradle wrapper chooses its distribution and lock-file directory; done means the server launches without requiring a manually changed GRADLE_HOME.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.