Installing j2sdk-1.4.2

Matthew Burgess ca9mbu at
Sun Jul 6 08:25:47 PDT 2003

Hello again all.  I just thought I'd let you all know that j2sdk-1.4.2
(binary I know) works like a charm once the commands in the book are
altered slightly.

Here's the current script I've used with success with some comments
embedded just in case anyone else feels like installing it at some

--- begin script ---

VERSION=1.4.2 &&
#We don't have a patch release number (e.g. _01) yet but it doesn't
#hurt and future-proofs the script
MV=`echo $VERSION | cut -d "_" -f 1,1` &&
V=`echo ${VERSION} | sed -e "s/\./_/g"` &&
#look for "tail +" here as there's now more than one line matching
#"tail" on it's own
T=`grep -a "tail +" j2sdk-${V}-linux-i?86.bin | cut -f 2 -d " "` &&     
tail $T j2sdk-${V}-linux-i?86.bin > install.sfx.$$ &&
chmod +x install.sfx.$$ &&
./install.sfx.$$ &&

#Now unpack the .pack files converting them into .jar archives
#otherwise java can't find it's own internal libraries (most notably

#Note that this is a stripped down version of what's in the .bin file
#Some further pruning may be possible
javahome=j2sdk${VERSION} &&
PACKED_JARS="lib/tools.jar jre/lib/rt.jar jre/lib/jsse.jar \
  jre/lib/charsets.jar jre/lib/ext/localedata.jar jre/lib/plugin.jar \
  jre/javaws/javaws.jar" &&
for i in $PACKED_JARS; do           
    printf "Creating %s\n" $javahome/$i            
    $javahome/lib/unpack$javahome/`dirname $i`/`basename $i \
cd $javahome &&
install -d /opt/j2sdk/j2sdk-precompiled-${MV} &&
mv * /opt/j2sdk/j2sdk-precompiled-${MV}

--- end script ---


Unsubscribe: send email to listar at
and put 'unsubscribe blfs-support' in the subject header of the message

More information about the blfs-support mailing list