home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
207.182.244.42
/
207.182.244.42.tar
/
207.182.244.42
/
pub
/
java
/
jdk-1_5_0_07-linux-amd64-rpm.bin
< prev
next >
Wrap
Text File
|
2006-07-22
|
43MB
|
163,290 lines
#!/bin/sh
PATH=/usr/bin:/bin
umask 022
NODOT_VERSION=150_07
javahome=jdk1.5.0_07
platform=linux
PACKED_JARS="lib/rt.jar lib/jsse.jar lib/charsets.jar lib/ext/localedata.jar"
ARCH=
LINUX_RPM=RPM
RPM_NAME=jdk-1_5_0_07-linux-amd64.rpm
JAVAWS_BIN=
libthread_path=
diskSpaceRequired=121304
MIME_TYPE=application/x-java-jnlp-file
echo_args="-e "
tail_args="-n "
more <<"EOF"
Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT
KIT 5.0
SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE
THE SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE
CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN
THIS BINARY CODE LICENSE AGREEMENT AND SUPPLEMENTAL
LICENSE TERMS (COLLECTIVELY "AGREEMENT"). PLEASE READ
THE AGREEMENT CAREFULLY. BY DOWNLOADING OR INSTALLING
THIS SOFTWARE, YOU ACCEPT THE TERMS OF THE AGREEMENT.
INDICATE ACCEPTANCE BY SELECTING THE "ACCEPT" BUTTON AT
THE BOTTOM OF THE AGREEMENT. IF YOU ARE NOT WILLING TO
BE BOUND BY ALL THE TERMS, SELECT THE "DECLINE" BUTTON
AT THE BOTTOM OF THE AGREEMENT AND THE DOWNLOAD OR
INSTALL PROCESS WILL NOT CONTINUE.
1. DEFINITIONS. "Software" means the identified above
in binary form, any other machine readable materials
(including, but not limited to, libraries, source
files, header files, and data files), any updates or
error corrections provided by Sun, and any user
manuals, programming guides and other documentation
provided to you by Sun under this Agreement.
"Programs" mean Java applets and applications intended
to run on the Java 2 Platform Standard Edition (J2SE
platform) platform on Java-enabled general purpose
desktop computers and servers.
2. LICENSE TO USE. Subject to the terms and
conditions of this Agreement, including, but not
limited to the Java Technology Restrictions of the
Supplemental License Terms, Sun grants you a
non-exclusive, non-transferable, limited license
without license fees to reproduce and use internally
Software complete and unmodified for the sole purpose
of running Programs. Additional licenses for
developers and/or publishers are granted in the
Supplemental License Terms.
3. RESTRICTIONS. Software is confidential and
copyrighted. Title to Software and all associated
intellectual property rights is retained by Sun and/or
its licensors. Unless enforcement is prohibited by
applicable law, you may not modify, decompile, or
reverse engineer Software. You acknowledge that
Licensed Software is not designed or intended for use
in the design, construction, operation or maintenance
of any nuclear facility. Sun Microsystems, Inc.
disclaims any express or implied warranty of fitness
for such uses. No right, title or interest in or to
any trademark, service mark, logo or trade name of Sun
or its licensors is granted under this Agreement.
Additional restrictions for developers and/or
publishers licenses are set forth in the Supplemental
License Terms.
4. LIMITED WARRANTY. Sun warrants to you that for a
period of ninety (90) days from the date of purchase,
as evidenced by a copy of the receipt, the media on
which Software is furnished (if any) will be free of
defects in materials and workmanship under normal use.
Except for the foregoing, Software is provided "AS IS".
Your exclusive remedy and Sun's entire liability under
this limited warranty will be at Sun's option to
replace Software media or refund the fee paid for
Software. Any implied warranties on the Software are
limited to 90 days. Some states do not allow
limitations on duration of an implied warranty, so the
above may not apply to you. This limited warranty
gives you specific legal rights. You may have others,
which vary from state to state.
5. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS
AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS,
REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO
THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE
LEGALLY INVALID.
6. LIMITATION OF LIABILITY. TO THE EXTENT NOT
PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS
LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR
DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL,
INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED
REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE,
EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES. In no event will Sun's liability to you,
whether in contract, tort (including negligence), or
otherwise, exceed the amount paid by you for Software
under this Agreement. The foregoing limitations will
apply even if the above stated warranty fails of its
essential purpose. Some states do not allow the
exclusion of incidental or consequential damages, so
some of the terms above may not be applicable to you.
7. TERMINATION. This Agreement is effective until
terminated. You may terminate this Agreement at any
time by destroying all copies of Software. This
Agreement will terminate immediately without notice
from Sun if you fail to comply with any provision of
this Agreement. Either party may terminate this
Agreement immediately should any Software become, or in
either party's opinion be likely to become, the subject
of a claim of infringement of any intellectual property
right. Upon Termination, you must destroy all copies
of Software.
8. EXPORT REGULATIONS. All Software and technical
data delivered under this Agreement are subject to US
export control laws and may be subject to export or
import regulations in other countries. You agree to
comply strictly with all such laws and regulations and
acknowledge that you have the responsibility to obtain
such licenses to export, re-export, or import as may be
required after delivery to you.
9. TRADEMARKS AND LOGOS. You acknowledge and agree as
between you and Sun that Sun owns the SUN, SOLARIS,
JAVA, JINI, FORTE, and iPLANET trademarks and all SUN,
SOLARIS, JAVA, JINI, FORTE, and iPLANET-related
trademarks, service marks, logos and other brand
designations ("Sun Marks"), and you agree to comply
with the Sun Trademark and Logo Usage Requirements
currently located at
http://www.sun.com/policies/trademarks. Any use you
make of the Sun Marks inures to Sun's benefit.
10. U.S. GOVERNMENT RESTRICTED RIGHTS. If Software
is being acquired by or on behalf of the U.S.
Government or by a U.S. Government prime contractor or
subcontractor (at any tier), then the Government's
rights in Software and accompanying documentation will
be only as set forth in this Agreement; this is in
accordance with 48 CFR 227.7201 through 227.7202-4 (for
Department of Defense (DOD) acquisitions) and with 48
CFR 2.101 and 12.212 (for non-DOD acquisitions).
11. GOVERNING LAW. Any action related to this
Agreement will be governed by California law and
controlling U.S. federal law. No choice of law rules
of any jurisdiction will apply.
12. SEVERABILITY. If any provision of this Agreement
is held to be unenforceable, this Agreement will remain
in effect with the provision omitted, unless omission
would frustrate the intent of the parties, in which
case this Agreement will immediately terminate.
13. INTEGRATION. This Agreement is the entire
agreement between you and Sun relating to its subject
matter. It supersedes all prior or contemporaneous
oral or written communications, proposals,
representations and warranties and prevails over any
conflicting or additional terms of any quote, order,
acknowledgment, or other communication between the
parties relating to its subject matter during the term
of this Agreement. No modification of this Agreement
will be binding, unless in writing and signed by an
authorized representative of each party.
SUPPLEMENTAL LICENSE TERMS
These Supplemental License Terms add to or modify the
terms of the Binary Code License Agreement.
Capitalized terms not defined in these Supplemental
Terms shall have the same meanings ascribed to them in
the Binary Code License Agreement . These Supplemental
Terms shall supersede any inconsistent or conflicting
terms in the Binary Code License Agreement, or in any
license contained within the Software.
A. Software Internal Use and Development License
Grant. Subject to the terms and conditions of this
Agreement and restrictions and exceptions set forth in
the Software "README" file, including, but not limited
to the Java Technology Restrictions of these
Supplemental Terms, Sun grants you a non-exclusive,
non-transferable, limited license without fees to
reproduce internally and use internally the Software
complete and unmodified for the purpose of designing,
developing, and testing your Programs.
B. License to Distribute Software. Subject to the
terms and conditions of this Agreement and restrictions
and exceptions set forth in the Software README file,
including, but not limited to the Java Technology
Restrictions of these Supplemental Terms, Sun grants
you a non-exclusive, non-transferable, limited license
without fees to reproduce and distribute the Software,
provided that (i) you distribute the Software complete
and unmodified and only bundled as part of, and for the
sole purpose of running, your Programs, (ii) the
Programs add significant and primary functionality to
the Software, (iii) you do not distribute additional
software intended to replace any component(s) of the
Software, (iv) you do not remove or alter any
proprietary legends or notices contained in the
Software, (v) you only distribute the Software subject
to a license agreement that protects Sun's interests
consistent with the terms contained in this Agreement,
and (vi) you agree to defend and indemnify Sun and its
licensors from and against any damages, costs,
liabilities, settlement amounts and/or expenses
(including attorneys' fees) incurred in connection with
any claim, lawsuit or action by any third party that
arises or results from the use or distribution of any
and all Programs and/or Software.
C. License to Distribute Redistributables. Subject to
the terms and conditions of this Agreement and
restrictions and exceptions set forth in the Software
README file, including but not limited to the Java
Technology Restrictions of these Supplemental Terms,
Sun grants you a non-exclusive, non-transferable,
limited license without fees to reproduce and
distribute those files specifically identified as
redistributable in the Software "README" file
("Redistributables") provided that: (i) you distribute
the Redistributables complete and unmodified, and only
bundled as part of Programs, (ii) the Programs add
significant and primary functionality to the
Redistributables, (iii) you do not distribute
additional software intended to supersede any
component(s) of the Redistributables (unless otherwise
specified in the applicable README file), (iv) you do
not remove or alter any proprietary legends or notices
contained in or on the Redistributables, (v) you only
distribute the Redistributables pursuant to a license
agr eement that protects Sun's interests consistent
with the terms contained in the Agreement, (vi) you
agree to defend and indemnify Sun and its licensors
from and against any damages, costs, liabilities,
settlement amounts and/or expenses (including
attorneys' fees) incurred in connection with any claim,
lawsuit or action by any third party that arises or
results from the use or distribution of any and all
Programs and/or Software.
D. Java Technology Restrictions. You may not create,
modify, or change the behavior of, or authorize your
licensees to create, modify, or change the behavior of,
classes, interfaces, or subpackages that are in any way
identified as "java", "javax", "sun" or similar
convention as specified by Sun in any naming convention
designation.
E. Distribution by Publishers. This section pertains
to your distribution of the Software with your printed
book or magazine (as those terms are commonly used in
the industry) relating to Java technology
("Publication"). Subject to and conditioned upon your
compliance with the restrictions and obligations
contained in the Agreement, in addition to the license
granted in Paragraph 1 above, Sun hereby grants to you
a non-exclusive, nontransferable limited right to
reproduce complete and unmodified copies of the
Software on electronic media (the "Media") for the sole
purpose of inclusion and distribution with your
Publication(s), subject to the following terms: (i)
You may not distribute the Software on a stand-alone
basis; it must be distributed with your Publication(s);
(ii) You are responsible for downloading the Software
from the applicable Sun web site; (iii) You must refer
to the Software as JavaTM 2 Platform Standard Edition
Development Kit 5.0; (iv) The Software must be
reproduced in its entirety and wit hout any
modification whatsoever (including, without limitation,
the Binary Code License and Supplemental License Terms
accompanying the Software and proprietary rights
notices contained in the Software); (v) The Media label
shall include the following information: Copyright
2006, Sun Microsystems, Inc. All rights reserved. Use
is subject to license terms. Sun, Sun Microsystems,
the Sun logo, Solaris, Java, the Java Coffee Cup logo,
J2SE, and all trademarks and logos based on Java are
trademarks or registered trademarks of Sun
Microsystems, Inc. in the U.S. and other countries.
This information must be placed on the Media label in
such a manner as to only apply to the Sun Software;
(vi) You must clearly identify the Software as Sun's
product on the Media holder or Media label, and you may
not state or imply that Sun is responsible for any
third-party software contained on the Media; (vii) You
may not include any third party software on the Media
which is intended to be a replacement or substitute for
the Soft ware; (viii) You shall indemnify Sun for all
damages arising from your failure to comply with the
requirements of this Agreement. In addition, you shall
defend, at your expense, any and all claims brought
against Sun by third parties, and shall pay all damages
awarded by a court of competent jurisdiction, or such
settlement amount negotiated by you, arising out of or
in connection with your use, reproduction or
distribution of the Software and/or the Publication.
Your obligation to provide indemnification under this
section shall arise provided that Sun: (a) provides
you prompt notice of the claim; (b) gives you sole
control of the defense and settlement of the claim;
(c) provides you, at your expense, with all available
information, assistance and authority to defend; and
(d) has not compromised or settled such claim without
your prior written consent; and (ix) You shall provide
Sun with a written notice for each Publication; such
notice shall include the following information: (1)
title of Publication, (2) author(s), (3) date of
Publication, and (4) ISBN or ISSN numbers. Such notice
shall be sent to Sun Microsystems, Inc., 4150 Network
Circle, M/S USCA12-110, Santa Clara, California 95054,
U.S.A , Attention: Contracts Administration.
F. Source Code. Software may contain source code
that, unless expressly licensed for other purposes, is
provided solely for reference purposes pursuant to the
terms of this Agreement. Source code may not be
redistributed unless expressly provided for in this
Agreement.
G. Third Party Code. Additional copyright notices and
license terms applicable to portions of the Software
are set forth in the THIRDPARTYLICENSEREADME.txt file.
In addition to any terms and conditions of any third
party opensource/freeware license identified in the
THIRDPARTYLICENSEREADME.txt file, the disclaimer of
warranty and limitation of liability provisions in
paragraphs 5 and 6 of the Binary Code License Agreement
shall apply to all Software in this distribution.
H. Termination for Infringement. Either party may
terminate this Agreement immediately should any
Software become, or in either party's opinion be likely
to become, the subject of a claim of infringement of
any intellectual property right.
For inquiries please contact: Sun Microsystems, Inc.,
4150 Network Circle, Santa Clara, California 95054,
U.S.A. (LFI#143333/Form ID#011801)
EOF
agreed=
while [ -z "$agreed" ]; do
echo
echo "Do you agree to the above license terms? [yes or no] "
read reply leftover
case $reply in
[yY] | [yY][eE][sS])
agreed=1
;;
[nN] | [nN][oO])
echo "If you don't agree to the license you can't install this software";
exit 1
;;
esac
done
outname=install.sfx.$$
diskSpace=`df -k . | tail ${tail_args}-1 | awk '{if ( $4 ~ /%/) { print $3 } else { print $4 } }'`
if [ $diskSpace -lt $diskSpaceRequired ]; then
printf "You will need atleast %s kBytes of Disk Free\n" $diskSpaceRequired
printf "Please free up the required Disk Space and try again\n"
exit 3
fi
trap 'rm -f $outname; exit 1' HUP INT QUIT TERM
echo "Unpacking..."
tail ${tail_args}+750 $0 > $outname
if [ -x /usr/bin/sum ]; then
echo "Checksumming..."
sum=`/usr/bin/sum $outname`
index=1
for s in $sum; do
case $index in
1)
sum1=$s;
index=2;
;;
2)
sum2=$s;
index=3;
;;
esac
done
if expr $sum1 != 60634 || expr $sum2 != 41580 ; then
echo "The download file appears to be corrupted. Please refer"
echo "to the Troubleshooting section of the Installation"
echo "Instructions on the download page for more information."
echo "Please do not attempt to install this archive file."
exit 1
fi
else
echo "Can't find /usr/bin/sum to do checksum. Continuing anyway."
fi
chmod +x $outname
echo "Extracting..."
./$outname
rm -f $outname #we dont need it anymore, so conserve disk space
#=================================================
# Add Java Web Start entry to /etc/mailcap
# param - $1 - mailcap file
#-------------------------------------------------
UpdateMailcap() {
MAILCAP_FILE=$1
MC_COMMENT="# Java Web Start"
MC_TEXT=
if [ -w ${MAILCAP_FILE} ]; then
# Remove existing entry, if present
MC_TEXT=`grep -v "${MIME_TYPE}" ${MAILCAP_FILE} | \
grep -v "${MC_COMMENT}"`
fi
# Add new entry
if [ -w `dirname ${MAILCAP_FILE}` ]; then
MC_TEXT="${MC_TEXT}\n${MC_COMMENT}"
MC_TEXT="${MC_TEXT}\n${MIME_TYPE}; $LATEST_JAVAWS_PATH %s"
echo ${echo_args}"${MC_TEXT}" > ${MAILCAP_FILE}
else
echo "WARNING - cannot write to file:"
echo " ${MAILCAP_FILE}"
echo "Check permissions."
fi
}
# End of UpdateMailcap
#=================================================
# Add Java Web Start entry to /etc/.mime.types
# param - $1 - mime file
#-------------------------------------------------
UpdateMimeTypes() {
MIME_FILE=$1
NS_COMMENT1="#--Netscape Communications Corporation MIME Information"
NS_COMMENT2="#Do not delete the above line. It is used to identify the file type."
NS_COMMENT3="#mime types added by Netscape Helper"
JNLP_ENTRY="type=${MIME_TYPE} desc=\"Java Web Start\" exts=\"jnlp\""
# Create the file if it does not exist
if [ ! -w ${MIME_FILE} ]; then
if [ -w `dirname ${MIME_FILE}` ]; then
echo "${NS_COMMENT1}" > ${MIME_FILE}
echo "${NS_COMMENT2}" >> ${MIME_FILE}
echo "${NS_COMMENT3}" >> ${MIME_FILE}
else
echo "WARNING - cannot write to file:"
echo " ${MIME_FILE}"
echo "Check permissions."
return
fi
fi
# Add the jnlp entry if it does not already exist.
if [ -z "`grep ${MIME_TYPE} ${MIME_FILE}`" ]; then
echo ${JNLP_ENTRY} >> ${MIME_FILE}
fi
}
# End of UpdateMimeTypes
#=================================================
# Get the location of the GNOME top directory. This should either be the
# directory specified in GNOMEDIR, or /usr.
#
# Given an input directory, determine if it appears to be a valid GNOME top
# level directory. If it is valid, then return the input; otherwise return
# an empty string.
#
# Note: The user's home directory is always a valid location for the GNOME
# association files.
#
# param - $1 - gnome top dir
#-------------------------------------------------
GetGNOMETopDir() {
_gnome_dir=$1
if [ "${_gnome_dir}" != "${HOME}" -a \
! \( -d ${_gnome_dir}/${APP_REGISTRY} -a \
-d ${_gnome_dir}/${MIME_INFO} \) ]; then
# This isn't the user's home directory, and one or both of the
# application directories are missing, but this could still be
# a valid. If this directory contains bin/gnome* files,
# lib/libgnome* files, and a share directory, then assume it is
# a valid GNOME top level directory.
_gnomebin="`ls ${_gnome_dir}/bin/gnome* 2> /dev/null`"
_gnomelib="`ls ${_gnome_dir}/lib/libgnome* 2> /dev/null`"
if [ -z "${_gnomebin}" -o \
-z "${_gnomelib}" -o \
! -d ${_gnome_dir}/${GNOME_SHARE} ]; then
# This doesn't seem to be a valid GNOME top level directory.
_gnome_dir=
fi
fi
echo ${_gnome_dir}
}
# End of GetGNOMETopDir
#=================================================
# Add an entry to GNOME application registry
# param - $1 - mime type associated mime type
# param - $2 - extension associated file extension
# param - $3 - name used to name GNOME registry files
# param - $4 - command what to invoke when launching file/mime type
# param - $5 - icon base name of icon file
# param - $6 - icon ext extension for icon file
# param - $7 - description description for association
#-------------------------------------------------
AddGNOME() {
_mime_type=$1
_extension=$2
_name=$3
_command=$4
_icon=$5
_icon_ext=$6
_description=$7
if [ -n "${_mime_type}" -a \
-n "${_extension}" -a \
-n "${_name}" -a \
-n "${_command}" -a \
-n "${_icon}" -a \
-n "${_icon_ext}" ]; then
# check the GNOMEDIR environment variable to see if it points to a valid
# GNOME top level directory.
_gnome_dir=`GetGNOMETopDir ${GNOMEDIR}`
if [ -z "${_gnome_dir}" ]; then
# GNOMEDIR was invalid, so check in /usr
_gnome_dir=`GetGNOMETopDir ${GNOMEDIR_DEFAULT}`
if [ -z "${_gnome_dir}" ]; then
# GNOME doesn't seem to be installed
return 1
fi
fi
if [ -d $LATEST_JRE_PATH/lib/images/icons ]; then
# the various directories may need to be created if no themes
# have ever been installed before
mkdir -p ${_gnome_dir}/${BASE_ICONS}
mkdir -p ${_gnome_dir}/${HIGH_CONTRAST_ICONS}
mkdir -p ${_gnome_dir}/${HIGH_CONTRAST_INVERSE_ICONS}
mkdir -p ${_gnome_dir}/${LOW_CONTRAST_ICONS}
# copy the icons used on the GNOME desktop
cp -f $LATEST_JRE_PATH/lib/images/icons/${_icon}.${_icon_ext} \
${_gnome_dir}/${BASE_ICONS}/${_icon}.${_icon_ext}
cp -f $LATEST_JRE_PATH/lib/images/icons/${_icon}_HighContrast.${_icon_ext} \
${_gnome_dir}/${HIGH_CONTRAST_ICONS}/${_icon}.${_icon_ext}
cp -f $LATEST_JRE_PATH/lib/images/icons/${_icon}_HighContrastInverse.${_icon_ext} \
${_gnome_dir}/${HIGH_CONTRAST_INVERSE_ICONS}/${_icon}.${_icon_ext}
cp -f $LATEST_JRE_PATH/lib/images/icons/${_icon}_LowContrast.${_icon_ext} \
${_gnome_dir}/${LOW_CONTRAST_ICONS}/${_icon}.${_icon_ext}
fi
# since we are pretty certain this is a valid GNOME installation, create
# the required association directories in case they don't already exist.
mkdir -p ${_gnome_dir}/${MIME_INFO}
mkdir -p ${_gnome_dir}/${APP_REGISTRY}
GNOME_KEYS_FILE=${_gnome_dir}/${MIME_INFO}/${_name}.keys
GNOME_MIME_FILE=${_gnome_dir}/${MIME_INFO}/${_name}.mime
GNOME_APPS_FILE=${_gnome_dir}/${APP_REGISTRY}/${_name}.applications
# Create the keys file.
echo "${_mime_type}" > $GNOME_KEYS_FILE
echo " description=${_description}" >> $GNOME_KEYS_FILE
echo " icon_filename=${_icon}" >> $GNOME_KEYS_FILE
echo " default_action_type=application" >> $GNOME_KEYS_FILE
echo " default_application_id=${_name}" >> $GNOME_KEYS_FILE
echo " short_list_application_user_additions=${_name}" >> $GNOME_KEYS_FILE
# Create the mime file.
echo "${_mime_type}" > $GNOME_MIME_FILE
echo " ext: ${_extension}" >> $GNOME_MIME_FILE
# Create the apps file.
echo "${_name}" > $GNOME_APPS_FILE
echo " command=${_command}" >> $GNOME_APPS_FILE
echo " name=${_name}" >> $GNOME_APPS_FILE
echo " can_open_multiple_files=false" >> $GNOME_APPS_FILE
echo " requires_terminal=false" >> $GNOME_APPS_FILE
echo " mime_types=${_mime_type}" >> $GNOME_APPS_FILE
fi
}
# End of AddGNOME
if [ -z "$LINUX_RPM" ]; then
UNPACK_EXE=$javahome/bin/unpack200
if [ -f $UNPACK_EXE ]; then
chmod +x $UNPACK_EXE
packerror=""
for i in $PACKED_JARS; do
if [ -f $javahome/`dirname $i`/`basename $i .jar`.pack ]; then
printf "Creating %s\n" $javahome/$i
$UNPACK_EXE $javahome/`dirname $i`/`basename $i .jar`.pack $javahome/$i
if [ ! -f $javahome/$i ]; then
printf "Failed to unpack jar files %s. Please refer\n" $i
printf "to the Troubleshooting section of the Installation\n"
printf "Instructions on the download page for more information.\n"
packerror="1"
fi
rm -f $javahome/`dirname $i`/`basename $i .jar`.pack
fi
done
if [ "$packerror" = "1" ]; then
printf "ERROR: Installation failed. Please refer to the Troubleshooting Section of\n"
printf "the Installation Instructions on the download page.\n"
if [ -d $javahome ]; then
/bin/rm -rf $javahome
exit 2
fi
fi
fi
if [ -n "$libthread_path" ] && [ -f "$libthread_path/`uname -r`/libthread.so.1" ]; then
echo "Making libthread links"
ln -s `uname -r`/libthread.so.1 $libthread_path/libthread.so.1
ln -s libthread.so.1 $libthread_path/libthread.so
fi
userid=`expr "\`id\`" : ".*uid=[0-9]*(\(.[0-9a-z]*\)) .*"`
if [ -f $HOME/.java/properties$NODOT_VERSION ]; then
if [ "$userid" = "root" ]; then
su $USER -c "mv -f $HOME/.java/properties$NODOT_VERSION $HOME/.java/_properties$NODOT_VERSION"
else
mv -f $HOME/.java/properties$NODOT_VERSION $HOME/.java/_properties$NODOT_VERSION
fi
fi
if [ -n "$javahome" ]; then
PREFS_LOCATION=$javahome
subdir=`echo $javahome "jre" | awk '{if ( index($1,"jdk") ) { print $2 } }'`
if [ "$subdir" = "jre" ]; then
PREFS_LOCATION=$PREFS_LOCATION/jre
fi
if [ "$userid" = "root" ]; then
PREFS_LOCATION=/etc/.java
fi
if [ ! -d $PREFS_LOCATION ]; then
mkdir -m 755 $PREFS_LOCATION
fi
if [ ! -d $PREFS_LOCATION/.systemPrefs ]; then
mkdir -m 755 $PREFS_LOCATION/.systemPrefs
fi
if [ ! -f $PREFS_LOCATION/.systemPrefs/.system.lock ]; then
touch $PREFS_LOCATION/.systemPrefs/.system.lock
chmod 644 $PREFS_LOCATION/.systemPrefs/.system.lock
fi
if [ ! -f $PREFS_LOCATION/.systemPrefs/.systemRootModFile ]; then
touch $PREFS_LOCATION/.systemPrefs/.systemRootModFile
chmod 644 $PREFS_LOCATION/.systemPrefs/.systemRootModFile
fi
# fix for: 4728032 - Install needs to generate shared class files(32bit only)
if [ x$ARCH = "x32" ]; then
$javahome/bin/java -client -Xshare:dump > /dev/null 2>&1
fi
fi
if [ -n "$JAVAWS_BIN" -a -z "$JAVAWS_PRIVATE" ]; then
FULLJAVAHOME=`cd $javahome; pwd`
LATEST_JAVAWS_PATH=$FULLJAVAHOME/$JAVAWS_BIN
LATEST_JRE_PATH=`dirname \`dirname $LATEST_JAVAWS_PATH\``
# Setup user level mime associations
UpdateMailcap "$HOME/.mailcap"
UpdateMimeTypes "$HOME/.mime.types"
if [ "$userid" = "root" ]; then
# Setup system level mime associations
UpdateMailcap "/etc/mailcap"
UpdateMimeTypes "/etc/mime.types"
GNOMEDIR_DEFAULT=/usr
if [ "$platform" = "solaris" ]; then
GNOME_SHARE=share/gnome
else
GNOME_SHARE=share
fi
MIME_INFO=${GNOME_SHARE}/mime-info
APP_REGISTRY=${GNOME_SHARE}/application-registry
BASE_ICONS=share/pixmaps
HIGH_CONTRAST_ICONS=share/icons/HighContrast/48x48/apps
HIGH_CONTRAST_INVERSE_ICONS=share/icons/HighContrastInverse/48x48/apps
LOW_CONTRAST_ICONS=share/icons/LowContrast/48x48/apps
else
GNOMEDIR=${HOME}
GNOMEDIR_DEFAULT=${HOME}
MIME_INFO=.gnome/mime-info
APP_REGISTRY=.gnome/application-info
BASE_ICONS=.icons/gnome/48x48/apps
HIGH_CONTRAST_ICONS=.icons/gnome/HighContrast/48x48/apps
HIGH_CONTRAST_INVERSE_ICONS=.icons/gnome/HighContrastInverse/48x48/apps
LOW_CONTRAST_ICONS=.icons/gnome/LowContrast/48x48/apps
fi
# Setup the GNOME associations
AddGNOME application/java-archive \
jar \
java-archive \
"${LATEST_JRE_PATH}/bin/java -jar" \
sun-java \
png \
"Java Archive"
AddGNOME ${MIME_TYPE} \
jnlp \
java-web-start \
${LATEST_JAVAWS_PATH} \
sun-java \
png \
"Java Web Start Application"
fi
fi
if [ -n "$LINUX_RPM" ]; then
if [ "$1" = "-x" ]; then
echo "Extraction of RPM Done."
else
# If rpm and the file exists then use rpm to install.
if [ -f `pwd`/$RPM_NAME ]; then
rpm -ivh `pwd`/$RPM_NAME
fi
fi
fi
echo " "
echo "Done."
exit 0
ELF >