public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-java] JAVA_HOME set to 1.4.2
@ 2006-07-31 13:08 Kurt Guenther
  2006-07-31 13:15 ` Wiktor Wandachowicz
  0 siblings, 1 reply; 4+ messages in thread
From: Kurt Guenther @ 2006-07-31 13:08 UTC (permalink / raw
  To: gentoo-java


Apologies if this is an FAQ, but I hunted around before posting.

My JAVA_HOME is set to :

$ echo $JAVA_HOME
/opt/sun-jdk-1.4.2.12

but, my version is 1.5:

 $ java -version
java version "1.5.0_07"

Here are my java-configs:

$ java-config-1 -L
[sun-jdk-1.4.2.12] "Sun JDK 1.4.2.12" (/etc/env.d/java/20sun-jdk-1.4.2.12) *
$ java-config-2 -L
1) Sun JDK 1.4.2.12 [sun-jdk-1.4] (/usr/share/java-config-2/vm/sun-jdk-1.4)
*) Sun JDK 1.5.0.07 [sun-jdk-1.5] (/usr/share/java-config-2/vm/sun-jdk-1.5)

This doesn't seem right as some scripts use JAVA_HOME to locate jar
files and other things.  Is there a way to correct this (besides the
obvious of overriding it)?

--Kurt

-- 
gentoo-java@gentoo.org mailing list



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

* Re: [gentoo-java] JAVA_HOME set to 1.4.2
  2006-07-31 13:08 [gentoo-java] JAVA_HOME set to 1.4.2 Kurt Guenther
@ 2006-07-31 13:15 ` Wiktor Wandachowicz
  2006-07-31 14:21   ` Joshua Nichols
  0 siblings, 1 reply; 4+ messages in thread
From: Wiktor Wandachowicz @ 2006-07-31 13:15 UTC (permalink / raw
  To: Kurt Guenther; +Cc: gentoo-java

See:
http://www.gentoo.org/proj/en/java/java-upgrade.xml#doc_chap6
(Applications try to use JAVA_HOME, which is set
to the Generation-1 VM)

Add the relevant snippet to one of your startup files, but this
way you loose some of the benefits of Generation-2 Java
handling through wrappers in /usr/bin. Decide for yourself ;)

Regards,
Wiktor
-- 
gentoo-java@gentoo.org mailing list



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

* Re: [gentoo-java] JAVA_HOME set to 1.4.2
  2006-07-31 13:15 ` Wiktor Wandachowicz
@ 2006-07-31 14:21   ` Joshua Nichols
  2006-07-31 16:55     ` Wiktor Wandachowicz
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Nichols @ 2006-07-31 14:21 UTC (permalink / raw
  To: Wiktor Wandachowicz; +Cc: Kurt Guenther, gentoo-java

Wiktor Wandachowicz wrote:
> Add the relevant snippet to one of your startup files, but this
> way you loose some of the benefits of Generation-2 Java
> handling through wrappers in /usr/bin. Decide for yourself ;)
>
That's actually not true. What you lose, is the benefit of not having
the current VM tied to the environment. Specifically, if you don't have
a user VM set... JAVA_HOME would point at the system VM... but if at
some point, you set a user VM, JAVA_HOME would still point to the system
VM until you source whichever file you add that snippet to.

It is extremely important to note that if you decide to use the snippet
for root, then java-config-1 has no way of knowing what the generation-1
VM is, because it uses JAVA_HOME to determine this.

-- 
Joshua Nichols
Gentoo/Java - Project Lead

-- 
gentoo-java@gentoo.org mailing list



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

* Re: [gentoo-java] JAVA_HOME set to 1.4.2
  2006-07-31 14:21   ` Joshua Nichols
@ 2006-07-31 16:55     ` Wiktor Wandachowicz
  0 siblings, 0 replies; 4+ messages in thread
From: Wiktor Wandachowicz @ 2006-07-31 16:55 UTC (permalink / raw
  To: gentoo-java

> That's actually not true. What you lose, is the benefit of not having
> the current VM tied to the environment. Specifically, if you don't have
> a user VM set... JAVA_HOME would point at the system VM... but if at
> some point, you set a user VM, JAVA_HOME would still point to the
> system VM until you source whichever file you add that snippet to.
>
> It is extremely important to note that if you decide to use the snippet
> for root, then java-config-1 has no way of knowing what the generation-1
> VM is, because it uses JAVA_HOME to determine this.

That's what I've meant when I wrote "some of the benefits".
Independence from the environment settings was the most obvious
one. But thanks for the clarification straight from the source.

Given the consequences, I think that the script snippet from the
docs can be put in a file. Then it could be sourced only when
necessary before running specific scripts. This way Kurt can have
best of both worlds, benefits from generation-2 and working
scripts that depend on JAVA_HOME variable.

Regards,
Wiktor

-- 
Registered Linux user #390131 (http://counter.li.org)
-- 
gentoo-java@gentoo.org mailing list



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

end of thread, other threads:[~2006-07-31 16:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-31 13:08 [gentoo-java] JAVA_HOME set to 1.4.2 Kurt Guenther
2006-07-31 13:15 ` Wiktor Wandachowicz
2006-07-31 14:21   ` Joshua Nichols
2006-07-31 16:55     ` Wiktor Wandachowicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox