Kevin O'Gorman schreef:
> Thaks, all -- I now have a new Java, and know about a few new
> utilities.  But I'm probably still in trouble.  The rest at the bottom.
> 
> On 6/14/05, Peter Ruskin <[EMAIL PROTECTED]> wrote:
> 
>>On Tuesday 14 June 2005 12:48, Neil Bothwick wrote:
>>
>>>On Tue, 14 Jun 2005 13:21:33 +0200, Holly Bostick wrote:
>>>
>>>>Indeed it is.... as long as you remember to update-eix after an
>>>>esync (or emerge sync). Gotta put that in as a cron job or
>>>>something-- or is there a better way to keep the index current?
>>>
>>>I run this script as a cron job in the early hours
>>>
>>>#!/bin/bash
>>>
>>>emerge --sync
>>>emerge world --update --deep --newuse --pretend --verbose \
>>>
>>>      | Mail -s "Updated packages for $(hostname)" neil
>>>
>>>glsa-check 2>/dev/null --test all | Mail -s "GLSA check on
>>>$(hostname)" neil update-eix
>>>emerge world -uDNf &>/dev/null
>>
>>I like the esync output. so my cron job looks like this:
>>
>># sync Gentoo nightly and check for updates
>>0 0 * * 1-6 /usr/sbin/esync -ns && /usr/bin/update-eix -q
>>&& /usr/bin/emerge world -uNvpl
>>
>>...and for Sunday:
>># sync Gentoo weekly and check (deep) for updates
>>0 0 * * 7 /usr/sbin/esync -ns && /usr/bin/update-eix -q
>>&& /usr/bin/emerge world -uNDvtpl
>>
>>--
>>Peter
> 
> 
> I got Java 1.5 to install.  Now the nifty new tools (thanks for eix!)
> tell me that 1.5 is all I have.   

Interesting... eix is nice, but apparently not perfect. If I search 'eix
java', neither blackdown nor Sun comes up (no jre's, actually). But a
search of 'eix jre' produces:

* dev-java/blackdown-jre
     Available versions:  !1.3.1-r9 1.4.1-r1 1.4.2.01-r1 *~1.4.2.02
     Installed:           1.4.2.01-r1
     Homepage:            http://www.blackdown.org
     Description:         Blackdown Java Runtime Environment 1.4.2.02

* dev-java/compaq-jre
     Available versions:  *1.3.1-r3
     Installed:           no
     Homepage:
ftp://ftp.compaq.com/pub/products/linuxdevtools/latest/
     Description:         Compaq Java Development Kit 1.3.1 for
Alpha/Linux/GNU

* dev-java/ibm-jre-bin
     Available versions:  ~1.4.1-r1 ~1.4.2
     Installed:           no
     Homepage:            http://www-106.ibm.com/developerworks/java/jdk/
     Description:         IBM Java Development Kit 1.4.2

* dev-java/jrexx
     Available versions:  1.1.1
     Installed:           no
     Homepage:            http://www.karneim.com/jrexx/
     Description:         Regular expression API for textual pattern
matching based on the finite state automaton theory.

* dev-java/sun-jre-bin
     Available versions:  1.4.2.07-r1 1.4.2.08 ~1.5.0.02 ~1.5.0.03
     Installed:           1.5.0.03
     Homepage:            http://java.sun.com/j2se/
     Description:         Sun's J2SE Platform


Found 5 matches

which correctly shows that I have both the blackdown and Sun Java
runtime environments installed.

> Of course, when I look in /opt, I get
> a different impression of things.  Am I right in surmising that
> I have all those old versions, and I just need java-config to point
> to various places to get other things to happen?
> 
> If so, I'm in good shape, because I just did a user-only config
> to 1.5 so presumably 'root' is still using 1.4.2.

Here's one way of checking:

# export

<snip>
declare -x JAVAC="/opt/blackdown-jdk-1.4.2.01/bin/javac"
declare -x JAVA_HOME="/opt/blackdown-jdk-1.4.2.01"
declare -x JDK_HOME="/opt/blackdown-jdk-1.4.2.01"


$ export

<snip>
declare -x JAVAC="/opt/blackdown-jdk-1.4.2.01/bin/javac"
declare -x JAVA_HOME="/opt/sun-jre-bin-1.5.0.03"
declare -x JDK_HOME="/opt/blackdown-jdk-1.4.2.01"


So as you can see, the exported variables for root and the user are
different, at least as far as what Java VM are being used-- I don't have
the Sun JDK installed, but only the Blackdown, so that's correct too. It
doesn't seem to make any difference for the Java executables I've used
so far.

The idea being, 'export' without parameters will give you a list of the
current environment variables in use and their state. Of course, in this
case, you could just do a 'java-config -f' for both the user and for
root, to confirm what VM each one was using.

Hope this helps,
Holly
-- 
gentoo-user@gentoo.org mailing list

Reply via email to