Although some may dislike my use of default Kubuntu directories for
   Java rather than /usr/local, Kubuntu has Sun Java 5 (not sure which
   specific minor version) in its repositories. I wanted to share how to
   update such to the latest version.  If you already have installed the
   default Sun binaries on Kubuntu, then the links are already around for
   you to update to the latest Java version.  If you have not installed
   Kubuntu's default Sun Java, you can do so in the command line by:
   sudo apt-get install sun-java5-jdk
   Thereby, to update my Java to the current version, I download the
   Linux tar from Sun's website and untar it (using Kubuntu's graphical
   utilities) to my Desktop.  Thereby, as root I move the file as
   follows:
   sudo mv Desktop/someSunJavaVersionFolder /usr/lib/jvm
   Next, we need to let Kubuntu change to the right version to use.
   First, go into the /usr/lib/jvm folder and create a symbolic link to
   the current version:
   cd /usr/lib/jvm;
   ln -sf ./someSunJavaVersion java-6-sun
   Now you are ready to tell Kubuntu to use the current version.  Kubuntu
   stores symbolic links to some programs so that it can change between
   different versions easily without having to reinstall everything.
   Thereby, in /etc/alternatives we can find all the programs Kubuntu is
   currently set to use.  To update these links, you can do so by hand,
   but there is a utility to do it for you called update-alternatives .
   The following will do the trick to change to the current version by
   asking you what you want to use for Java.
   sudo update-alternatives --config java
   You can also update many of the other Java tools and symbolic links,
   listed below
   jar             javac         javap         jconsole       jinfo.1.gz
   jsadebugd.1.gz  jstatd.1.gz
   jar.1.gz        javac.1.gz    javap.1.gz    jconsole.1.gz  jmap
   jstack
   jarsigner       javadoc       java-rmi.cgi  jcontrol       jmap.1.gz
   jstack.1.gz
   jarsigner.1.gz  javadoc.1.gz  java_vm       jdb            jps
   jstat
   java            javah         javaws        jdb.1.gz       jps.1.gz
   jstat.1.gz
   java.1.gz       javah.1.gz    javaws.1.gz   jinfo          jsadebugd
   jstatd
   Just use the same command above:
   sudo update-alternatives --config [SOME JAVA LINK]
   on each tool or symbolic link you want to update.
   Lastly, if you never installed the default Kubuntu Java 5 from its
   repositories, then you could just place the correct files in the right
   place, and create all the links listed by yourself in
   /etc/alternatives .  I hope  update-alternatives will work likewise
   without the default install, but I haven't tested that.
   -Maulik Mistry
--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to