Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Oct 2012 10:29:05 -0500
From:      Peggy Wilkins <enlil65@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   Which java version: confusion
Message-ID:  <CAG_3X=mejY=OrLs72iusJFbW35Hh0eXGjiMSA%2B-KR_4wayBAhA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I have two java ports installed on several of my systems:

% cat /usr/local/etc/javavms
/usr/local/diablo-jdk1.6.0/bin/java # DiabloCaffe1.6.0
/usr/local/jdk1.6.0/bin/java # FREEBSD-JDK1.6.0

It seems that when I update of one of the versions, the version
executed by default turns out to be "the latest version installed".
For example, on one of my systems:

% java -version
openjdk version "1.6.0_32"
OpenJDK Runtime Environment (build 1.6.0_32-b25)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

But after updating diablo-jdk-1.6.0.07.02_19 to
diablo-jdk-1.6.0.07.02_20 I am now getting this instead:

% java -version
java version "1.6.0_07"
Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)
Diablo Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)

I have not set $JAVA_HOME.  Am I required to set it in order to
dependably get one version vs. the other by default?  Is there a way
to set one of them to be preferred if JAVA_HOME isn't set?  I don't
understand why simply updating one of the installed versions would
result in a switch of which version is preferred.

I assume I am simply clueless about something I'm supposed to know but don't...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG_3X=mejY=OrLs72iusJFbW35Hh0eXGjiMSA%2B-KR_4wayBAhA>