LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to upgrade Firefox Java JRE to 1.5.0_10 on SuSE 9.3? (https://www.linuxquestions.org/questions/linux-software-2/how-to-upgrade-firefox-java-jre-to-1-5-0_10-on-suse-9-3-a-521478/)

jackalista 01-21-2007 02:36 PM

How to upgrade Firefox Java JRE to 1.5.0_10 on SuSE 9.3?
 
Hi folks,

I am running a pretty vanilla installation of SuSE 9.3 and want to upgrade the JRE for Firefox from the 1.4.x that comes with the distribution to jre-1_5_0_10 (jre-1_5_0_10-linux-i586-rpm.bin, which I got from Sun's site). Note I'm not sure this is the right rpm to install but it's all I've found so far.

I found installation instructions here:

http://java.com/en/download/help/5000010500.xml#rpm

These instructions appear to be for upgrading the JRE for mozilla, not firefox. Can anyone point me to good instructions for upgrading the JRE for firefox on SuSE 9.3? The instructions at the above link involve making symbolic links to a shared object library so since they don't appear to be relevant for firefox and as I didn't want to mess up my system, I didn't perform any of the actions. I'd love to hear from someone who has successfully upgraded the JRE on SuSE 9.3 to version 1.5.0, thanks in advance.

Jack
jack@twaxx.com

berbae 01-22-2007 03:16 PM

Hi jackalista
I can tell you how I upgrade the java JRE in my system which is a tweaked SUSE Linux with Firefox as a browser :
1) The last version is called "Java Runtime Environment (JRE) 6"
see http://java.sun.com to download the Linux RPM in self extracting file.
the name of this file is 'jre-6-linux-i586.rpm.bin'
2) to extract the binary rpm do in a console as user login :
Code:

cd <download directory>
chmod 755 jre-6-linux-i586.rpm.bin
./jre-6-linux-i586.rpm.bin -x
rm jre-6-linux-i586.rpm.bin

you get the binary rpm file 'jre-6-linux-i586.rpm'
3) to upgrade to this new version do in a console as root login :
Code:

cd <download directory>
rpm -Uvh jre-6-linux-i586.rpm

You can have several java JRE versions on your machine, so you can keep the original 1.4 version installed.
4) to use the new version :
I change as root the environment variables in the files '/etc/profile.d/alljava.csh' and '/etc/profile.d/alljava.sh'.
For example I get for the file alljava.sh :
Code:

#    /etc/profile.d/alljava.sh
#
# send feedback to http://www.suse.de/feedback

#
# This script sets some environment variables for default java.
# Affected variables: PATH, JAVA_BINDIR, JAVA_HOME, JRE_HOME,
#                    JDK_HOME, SDK_HOME
#

if [ -x /usr/lib/java/bin/java ] || [ -x /usr/lib/java/bin/jre ] ; then
  export PATH=$PATH:/usr/lib/java/bin
  export JAVA_BINDIR=/usr/lib/java/bin
  export JAVA_ROOT=/usr/lib/java
  export JAVA_HOME=/usr/lib/java
  if [ -x /usr/lib/java/jre/bin/java ] ; then
    export JRE_HOME=/usr/lib/java/jre
  else
    export JRE_HOME=/usr/lib/java
  fi
  unset JDK_HOME
  unset SDK_HOME
  if [ -x /usr/lib/java/bin/javac ] ; then
    # it is development kit
    if [ -x /usr/lib/java/bin/jre ] ; then
      export JDK_HOME=/usr/lib/java
    else
      export JDK_HOME=/usr/lib/java
      export SDK_HOME=/usr/lib/java
    fi
  fi
elif [ -x /usr/java/jre1.6.0/bin/java ] ; then
    # it is IBMJava2-JRE or SunJava2-JRE
    export PATH=$PATH:/usr/java/jre1.6.0/bin
    export JAVA_BINDIR=/usr/java/jre1.6.0/bin
    export JAVA_ROOT=/usr/java
    export JAVA_HOME=/usr/java/jre1.6.0
    export JRE_HOME=/usr/java/jre1.6.0

    unset JDK_HOME
    unset SDK_HOME
elif [ -x /usr/lib/java/jre/bin/java ] ; then
    # it is IBMJava2-JRE or SunJava2-JRE
    export PATH=$PATH:/usr/lib/java/jre/bin
    export JAVA_BINDIR=/usr/lib/java/jre/bin
    export JAVA_ROOT=/usr/lib/java
    export JAVA_HOME=/usr/lib/java/jre
    export JRE_HOME=/usr/lib/java/jre
    unset JDK_HOME
    unset SDK_HOME
fi

5) To change the Firefox plugin do as root :
Code:

cd /opt/firefox/plugins
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.6.0/plugin/i386/ns7/libjavaplugin_oji.so

Your Firefox installation directory may be another one, as I installed mine from the Mozilla binary tarball.
6) Do a logout/login

This method works well for me, I have no problem with the new Java JRE version.

Have an nice day.


All times are GMT -5. The time now is 10:13 PM.