Note: if you have something that really needs java6 and won't work with java7, then you might want to hold-off on installing java7. The reason is it might be a little tricky to try to keep both 6 and 7 on same macintosh, as the 7 pkg does some messing with some of the apple-6-java items, as detailed below. So, I'll be looking for some step-by-step instructions on keeping 6 and 7 on same mac before rolling this out... See also http://reviews.cnet.com/8301-13727_7-57533880-263/java-preferences-missing-after-latest-os-x-java-update/ on Oct 18, 2012.
DETAILS
The preinstall shell script in jre-7u9-macosx-x64.dmg just removes the Apple pref-pane (as well as plug-in), without warning, below.
#!/bin/bash
PLUGIN_BASEDIR=/Library/Internet\ Plug-Ins
PLUGIN_NAME=${PLUGIN_BASEDIR}/JavaAppletPlugin.plugin
MKDIR=`which mkdir`
RM=/bin/rm
# Remove the symlink before installation forcing ystem Preferences.app to refresh its cache
PREF_PANE_NAME=JavaControlPanel.prefpane
PREF_PANE_DEST=/Library/PreferencePanes/
# Actually removes the symlink
if [[ -h "${PREF_PANE_DEST}/${PREF_PANE_NAME}" ]]; then
${RM} -rf "${PREF_PANE_DEST}/${PREF_PANE_NAME}"
fi
# Create the /Library/Internet Plug-Ins if not present
if [[ ! -d "${PLUGIN_BASEDIR}" ]]; then
${MKDIR} -p "${PLUGIN_BASEDIR}"
fi
# If Apple's plugin is present, then delete it
if [[ -h "${PLUGIN_NAME}" ]] && [[ -d "${PLUGIN_NAME}" ]]; then
${RM} -rf "${PLUGIN_NAME}"
fi
=== And the post install script sets up a symlink ===
#!/bin/bash
LN=`which ln`
CHOWN=`which chown`
PLUGIN_FILEPATH=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
PREF_PANE_NAME=JavaControlPanel.prefpane
PREF_PANE_SRC=/Library/Internet\ Plug- Ins/JavaAppletPlugin.plugin/Contents/Home/lib/deploy/JavaControlPanel.prefpane
PREF_PANE_DEST=/Library/PreferencePanes/
if [ ! -h "${PREF_PANE_DEST}/${PREF_PANE_NAME}" ]; then
${LN} -s "${PREF_PANE_SRC}" "${PREF_PANE_DEST}"
fi
${CHOWN} -R root:wheel "${PLUGIN_FILEPATH}"