Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap does not update PATH variable which results in unusable snap #11

Closed
K0-RR opened this issue Jun 20, 2021 · 6 comments · Fixed by #12
Closed

Snap does not update PATH variable which results in unusable snap #11

K0-RR opened this issue Jun 20, 2021 · 6 comments · Fixed by #12

Comments

@K0-RR
Copy link

K0-RR commented Jun 20, 2021

I installed gradle via snap, then installed Java 16 needed to build a project and removed Java 11. The problem is snap still points to nonexisting Java 11.

You are using an outdated version of Java (11). Java 16 or higher is required.
The JAVA_HOME environment variable is currently set to (/snap/gradle/101/usr/lib/jvm/default-java).

Tried removing and installing this snap again, sudo systemctl restart snapd snapd.socket and sudo systemctl daemon-reload with no luck.

@brlin-tw
Copy link
Contributor

The problem is snap still points to nonexisting Java 11.

It appears that Gradle points to the Java runtime bundled in the snap itself instead of the one possibly installed in the host system. Please try reproducing the issue again on a snap built with the modification in PR #12.

@tunix
Copy link
Contributor

tunix commented Jun 20, 2021

The error probably shows up like that because the project probably references against Java 16. Java 11 is perfectly fine and should not cause any trouble. Gradle seems to work fine with Java 8+

The change is ok.

@tunix tunix closed this as completed in #12 Jun 20, 2021
@K0-RR
Copy link
Author

K0-RR commented Jun 20, 2021

Please try reproducing the issue again on a snap built with the modification in PR #12.

How can I manually build a snap?

@brlin-tw
Copy link
Contributor

Install the snapcraft snap, then run the snapcraft command in the checked-out source tree in a text terminal.

@tunix
Copy link
Contributor

tunix commented Jun 21, 2021

I created another PR (#14) which fixes build issues. Once it's merged, it'll push new builds into the candidate channel so that you can test & let us know.

@tunix
Copy link
Contributor

tunix commented Jun 22, 2021

I just pushed latest changes to candidate channel.

Install via:

snap install gradle --classic --candidate

Update to candidate channel if you already installed it:

snap refresh gradle --candidate

Please test and report back if you have any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants