help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

After installing Java, what should I set JAVA_HOME to?


From: Zachary Kanfer
Subject: After installing Java, what should I set JAVA_HOME to?
Date: Wed, 2 Nov 2016 00:38:36 -0400

I've installed the java compiler (see the manifest file at [1] the end of this email). I'm able to compile Java files directly, which is great.

But I started the gradle quickstart guide, and I've started running into problems. Right now I have $JAVA_HOME set to /home/zck/.guix-profile/, but I am suspecting that is not right. When I run `./gradlew clean`, I get the following error:

    address@hidden:~/code/gradle-test$ ./gradlew clean
    Downloading https://services.gradle.org/distributions/gradle-3.0-bin.zip
   
    Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

(further stacktrace elided)

When I run `sudo ./gradlew clean`, it works fine. My suspicion is that it's related to $JAVA_HOME being symlinked to something not owned by my current user (/home/zck/.guix-profile is a symlink to /var/guix/profiles/per-user/zck/guix-profile/, which is a symlink to /var/guix/profiles/per-user/zck/guix-profile-20-link/, which is a symlink to /gnu/store/c483gnpwwcmcwdbdba25q3c7x1g79mzm-profile/, which is owned by root/guixbuild, although this directory has permissions to read and execute for all users).

Further supporting my suspicion that JAVA_HOME shouldn't be the guix profile is that I would think either guix or java should manage the directory, but not both.

So my question is: what's going on here? What do I need to change to be able to run gradle as my current user? Thanks.

[1] The manifest file to install javac is:

(use-package-modules java)

(packages->manifest
 (list ;;java
       icedtea
       (list icedtea "jdk")))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]