unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42423: icedtea: JAVA_HOME
@ 2020-07-19  5:09 Christopher Howard
  2020-07-19 10:29 ` Julien Lepiller
  2020-07-31 11:49 ` Michael Rohleder
  0 siblings, 2 replies; 5+ messages in thread
From: Christopher Howard @ 2020-07-19  5:09 UTC (permalink / raw)
  To: 42423

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)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#42423: icedtea: JAVA_HOME
  2020-07-19  5:09 bug#42423: icedtea: JAVA_HOME Christopher Howard
@ 2020-07-19 10:29 ` Julien Lepiller
  2020-07-31 11:49 ` Michael Rohleder
  1 sibling, 0 replies; 5+ messages in thread
From: Julien Lepiller @ 2020-07-19 10:29 UTC (permalink / raw)
  To: christopher, Christopher Howard, 42423

Le 19 juillet 2020 01:09:52 GMT-04:00, Christopher Howard <christopher.howard@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.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#42423: icedtea: JAVA_HOME
  2020-07-19  5:09 bug#42423: icedtea: JAVA_HOME Christopher Howard
  2020-07-19 10:29 ` Julien Lepiller
@ 2020-07-31 11:49 ` Michael Rohleder
  2020-07-31 14:14   ` Christopher Howard
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Rohleder @ 2020-07-31 11:49 UTC (permalink / raw)
  To: Christopher Howard; +Cc: christopher, 42423

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

Hi Christopher,

Christopher Howard <christopher.howard@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...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#42423: icedtea: JAVA_HOME
  2020-07-31 11:49 ` Michael Rohleder
@ 2020-07-31 14:14   ` Christopher Howard
  2020-07-31 15:10     ` Ricardo Wurmus
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Howard @ 2020-07-31 14:14 UTC (permalink / raw)
  To: Michael Rohleder; +Cc: 42423

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@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...






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#42423: icedtea: JAVA_HOME
  2020-07-31 14:14   ` Christopher Howard
@ 2020-07-31 15:10     ` Ricardo Wurmus
  0 siblings, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2020-07-31 15:10 UTC (permalink / raw)
  To: christopher; +Cc: 42423, Christopher Howard


Christopher Howard <christopher.howard@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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-31 15:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19  5:09 bug#42423: icedtea: JAVA_HOME Christopher Howard
2020-07-19 10:29 ` Julien Lepiller
2020-07-31 11:49 ` Michael Rohleder
2020-07-31 14:14   ` Christopher Howard
2020-07-31 15:10     ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).