GNU bug report logs - #42423
icedtea: JAVA_HOME

Previous Next

Package: guix;

Reported by: christopher <at> librehacker.com

Date: Sun, 19 Jul 2020 05:11:02 UTC

Severity: normal

To reply to this bug, email your comments to 42423 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#42423; Package guix. (Sun, 19 Jul 2020 05:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to christopher <at> librehacker.com:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 19 Jul 2020 05:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Howard <christopher.howard <at> qlfiles.net>
To: bug-guix <at> gnu.org
Subject: icedtea: JAVA_HOME
Date: Sat, 18 Jul 2020 21:09:52 -0800
Hi, I'm not going to pretend to be a Java expert, but I was trying to
build and run a Java application, and had to set JAVA_HOME manually. It
is my understanding from my research[1] that applications often will
want JAVA_HOME set to the path to the java install directory. It would
seem like it would be useful if Guix set that as well for the icedtea
and icedtea:jdk package.

If there are good reasons for that not to be, perhaps more
knowledgeable individuals will explain it.

One part I'm not quite sure about is what JAVA_HOME would be set to if
both icedtea and icedtea:jdk were installed.

[1] Many JAVA_HOME results in a Startpage.com search

-- 
Christopher Howard
p: +1 (907) 374-0257
w: https://librehacker.com
social: https://gnusocial.club/librehacker
gpg: ADDEAADE5D607C8D (keys.gnupg.net)





Information forwarded to bug-guix <at> gnu.org:
bug#42423; Package guix. (Sun, 19 Jul 2020 10:30:02 GMT) Full text and rfc822 format available.

Message #8 received at 42423 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: christopher <at> librehacker.com,
 Christopher Howard <christopher.howard <at> qlfiles.net>, 42423 <at> debbugs.gnu.org
Subject: Re: bug#42423: icedtea: JAVA_HOME
Date: Sun, 19 Jul 2020 06:29:06 -0400
Le 19 juillet 2020 01:09:52 GMT-04:00, Christopher Howard <christopher.howard <at> qlfiles.net> a écrit :
>Hi, I'm not going to pretend to be a Java expert, but I was trying to
>build and run a Java application, and had to set JAVA_HOME manually. It
>is my understanding from my research[1] that applications often will
>want JAVA_HOME set to the path to the java install directory. It would
>seem like it would be useful if Guix set that as well for the icedtea
>and icedtea:jdk package.
>
>If there are good reasons for that not to be, perhaps more
>knowledgeable individuals will explain it.
>
>One part I'm not quite sure about is what JAVA_HOME would be set to if
>both icedtea and icedtea:jdk were installed.
>
>[1] Many JAVA_HOME results in a Startpage.com search

icedtea being a subset of icedtea:jdk, you can't install both in the same profile anyway.




Information forwarded to bug-guix <at> gnu.org:
bug#42423; Package guix. (Fri, 31 Jul 2020 11:50:02 GMT) Full text and rfc822 format available.

Message #11 received at 42423 <at> debbugs.gnu.org (full text, mbox):

From: Michael Rohleder <mike <at> rohleder.de>
To: Christopher Howard <christopher.howard <at> qlfiles.net>
Cc: christopher <at> librehacker.com, 42423 <at> debbugs.gnu.org
Subject: Re: bug#42423: icedtea: JAVA_HOME
Date: Fri, 31 Jul 2020 13:49:44 +0200
[Message part 1 (text/plain, inline)]
Hi Christopher,

Christopher Howard <christopher.howard <at> qlfiles.net> writes:
> Hi, I'm not going to pretend to be a Java expert, but I was trying to
> build and run a Java application, and had to set JAVA_HOME manually. It
> is my understanding from my research[1] that applications often will
> want JAVA_HOME set to the path to the java install directory. It would
> seem like it would be useful if Guix set that as well for the icedtea
> and icedtea:jdk package.
>
> If there are good reasons for that not to be, perhaps more
> knowledgeable individuals will explain it.
>
> One part I'm not quite sure about is what JAVA_HOME would be set to if
> both icedtea and icedtea:jdk were installed.

I dont think this is a good idea (or even possible?):

From a Developer POV I think its pretty common to have many jdk's installed
(8,11,14 sometimes even 7). To what should JAVA_HOME be set/defaults in this
case?

I dont know a distribution which sets JAVA_HOME (per default) and I
think its much better to let the user or sysadmin decide which one is
best...
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#42423; Package guix. (Fri, 31 Jul 2020 14:16:02 GMT) Full text and rfc822 format available.

Message #14 received at 42423 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Howard <christopher.howard <at> qlfiles.net>
To: Michael Rohleder <mike <at> rohleder.de>
Cc: 42423 <at> debbugs.gnu.org
Subject: Re: bug#42423: icedtea: JAVA_HOME
Date: Fri, 31 Jul 2020 06:14:48 -0800
Hi, I am open to learning more and to guix developer wisdom. I don't
quite understand your argument, though — I wouldn't think this would be
any more difficult a question than deciding what version of the java
binary would show up in your profile: you would only select one version
in a profile. If you need to work with multiple versions (not talking
about dependencies) you would create multiple profiles, or multiple
manifest files to use with guix environment.

I would assume if we are talking about guix package dependencies, you
are relying on the direct paths. But practical case here is if you just
download some Java code and run "ant build" or "ant run": that won't
work unless "JAVA_HOME" is defined, which is a bother to figure out
yourself every time you want to update your profile. This is what I
have to do to get arduino-ide running (as well as running patchelf on
the generated binaries, but that is another story...)

-- 
Christopher Howard
p: +1 (907) 374-0257
w: https://librehacker.com
social: https://gnusocial.club/librehacker
gpg: ADDEAADE5D607C8D (keys.gnupg.net)

On Fri, 2020-07-31 at 13:49 +0200, Michael Rohleder wrote:
> Hi Christopher,
> 
> Christopher Howard <christopher.howard <at> qlfiles.net> writes:
> > Hi, I'm not going to pretend to be a Java expert, but I was trying
> > to
> > build and run a Java application, and had to set JAVA_HOME
> > manually. It
> > is my understanding from my research[1] that applications often
> > will
> > want JAVA_HOME set to the path to the java install directory. It
> > would
> > seem like it would be useful if Guix set that as well for the
> > icedtea
> > and icedtea:jdk package.
> > 
> > If there are good reasons for that not to be, perhaps more
> > knowledgeable individuals will explain it.
> > 
> > One part I'm not quite sure about is what JAVA_HOME would be set to
> > if
> > both icedtea and icedtea:jdk were installed.
> 
> I dont think this is a good idea (or even possible?):
> 
> From a Developer POV I think its pretty common to have many jdk's
> installed
> (8,11,14 sometimes even 7). To what should JAVA_HOME be set/defaults
> in this
> case?
> 
> I dont know a distribution which sets JAVA_HOME (per default) and I
> think its much better to let the user or sysadmin decide which one is
> best...






Information forwarded to bug-guix <at> gnu.org:
bug#42423; Package guix. (Fri, 31 Jul 2020 15:11:01 GMT) Full text and rfc822 format available.

Message #17 received at 42423 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: christopher <at> librehacker.com
Cc: 42423 <at> debbugs.gnu.org, Michael Rohleder <mike <at> rohleder.de>,
 Christopher Howard <christopher.howard <at> qlfiles.net>
Subject: Re: bug#42423: icedtea: JAVA_HOME
Date: Fri, 31 Jul 2020 17:10:32 +0200
Christopher Howard <christopher.howard <at> qlfiles.net> writes:

> […] This is what I
> have to do to get arduino-ide running (as well as running patchelf on
> the generated binaries, but that is another story...)

Recently, I also built the Arduino IDE to upload the software onto my
Open Theremin.  Instead of using patchelf I opted to make the loader
available globally:

   ln -s $(guix build glibc)/lib/ld-linux-x86-64.so.2 /lib64/

On Guix System we can also use “extra-special-file”:

  (extra-special-file "/lib64/ld-linux-x86-64.so.2"
                      (file-append glibc "/lib/ld-linux-x86-64.so.2"))

-- 
Ricardo




This bug report was last modified 3 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.