From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zachary Kanfer Subject: After installing Java, what should I set JAVA_HOME to? Date: Wed, 2 Nov 2016 00:38:36 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1144847ae2dd9805404a04d3 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1nKF-0000BC-WF for help-guix@gnu.org; Wed, 02 Nov 2016 00:39:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1nKE-0005ss-Ry for help-guix@gnu.org; Wed, 02 Nov 2016 00:39:00 -0400 Received: from mail-it0-x236.google.com ([2607:f8b0:4001:c0b::236]:37625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1nKE-0005sb-MU for help-guix@gnu.org; Wed, 02 Nov 2016 00:38:58 -0400 Received: by mail-it0-x236.google.com with SMTP id u205so14893235itc.0 for ; Tue, 01 Nov 2016 21:38:58 -0700 (PDT) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org --001a1144847ae2dd9805404a04d3 Content-Type: text/plain; charset=UTF-8 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: zck@zck-laptop:~/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"))) --001a1144847ae2dd9805404a04d3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I've installed the java compiler (see the ma= nifest file at [1] the end of this email). I'm able to compile Java fil= es 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:

=C2=A0=C2=A0=C2=A0 zck@zck-laptop:~/code/gradle-test$ ./gradlew clean
=C2=A0=C2=A0=C2=A0 Downloading h= ttps://services.gradle.org/distributions/gradle-3.0-bin.zip
=C2= =A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0 Exception in thread "main"= javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: = java.security.InvalidAlgorithmParameterException: the trustAnchors par= ameter must be non-empty

(further stacktrace elided)
<= br>
When I run `sudo ./gradlew clean`, it works fine. My suspicio= n is that it's related to $JAVA_HOME being symlinked to something not o= wned 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/profil= es/per-user/zck/guix-profile-20-link/, which is a symlink to /gnu/store/c48= 3gnpwwcmcwdbdba25q3c7x1g79mzm-profile/, which is owned by root/guixbuild, a= lthough this directory has permissions to read and execute for all users).<= br>
Further supporting my suspicion that JAVA_HOME shouldn= 9;t be the guix profile is that I would think either guix or java should ma= nage 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 i= nstall javac is:

(use-package-modules java)

(packages->man= ifest
=C2=A0(list ;;java
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 icedtea=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list icedtea "jdk")))
--001a1144847ae2dd9805404a04d3--