Search My Blog

Sunday, April 24, 2011

Shortcuts to Install Java JRE (Mostly in the GUI) for Fedora Linux

Installing or Updating Java JRE in Fedora Linux can be quite a Pain!:O I have been doing this for over 5 years now. And still, I sometimes forget all of the steps that it takes to make my update install and work successful. If you follow the instructions at http://www.java.com/en/download/help/linux_install.xml#rpm they will get you there. But, all of those long Commands in the Terminal wont work if you make one little mistake!:O I have found a few Short Cuts that you can do with your GUI Apps, to make this process a little faster and a little less painless. First off, Download the current Java "jre...bin" file from http://www.java.com/en/download/manual.jsp. You can check in Add-Remove Programs, Synaptic or Yum Extender, GUI Apps for managing Applications - Programs in Fedora, to see if you have more than one Java JRE Version Installed. If you do, then it's best to uninstall the ones that are older than the one you are installing. I had versions "6-23" and "6-24" both installed, because I didn't check before installing "6-24". Something interesting here. Synaptic is the only Package Manager that Saw the "6-23" Version of Java JRE that was installed on my System. The others only showed the "6-24" Version. Synaptic is not the Default Package - Application - Software Manager in Fedora. But I like to install and use it for some features that is has, like "Fix all Broken Packages". A feature which Yum, the default Package Manager for Fedora and it's GUI's doesn't have. You may or may not want to install Synaptic though. Because you can cause some conflicts with packages by using both Yum and Synaptic on the same System. I generally stay with Yum for RPM's and only use Synaptic for Apt Packages and for the "Fix Broken" feature when I have problems that I can't fix easily by just uninstalling and reinstalling an App. But most of the time they work fine together though. Also, Unlike most other Applications, Java JRE Does Not Update or Uninstall the Previous Versions on your System and this can cause Problems Sometimes, But Not Always. This is what the Java Web Site Recommends though, to Remove all older Versions of Java JRE, before Installing the New One. See the Screen Shots Above... Then open up Krusader or Thunar or a file manager that you can use to change the file permissions in the GUI. If you don't have Krusader or Thunar. Then use the Add-Remove Programs App in Fedora to install one of them. I much prefer Krusader and will be talking about it in this Post. Note, to run Krusader, you will also need to install the KDE Desktop System. Just install KDE and then make sure and Reboot your System so that Krusader will work in Gnome (if your using Gnome, like me). Next, Change the file permissions on your "jre...bin" file, to make the file executable and you can also change all of the permissions to read and write (as long as you trust your self on your own computer;) otherwise just make sure that your user and "root" have write permissions to the "jre...bin". You can do this in your regular user mode, as long as you downloaded the file in that mode. Otherwise you would need "root" privileges to change file permissions. Then, if you are in Krusader, just open up a Terminal (konsole) Window in the Directory that you downloaded the "jre...bin" file to (mine is "/home/don/Downloads"). Then, go to "Tools-Start-Terminal-Here" in Krusader. You will need to type "su" in the Terminal (konsole) Window that opens up (always without the "quote marks" in this installation. In some other operations the " is used, but not in these commands). And then type your "root" password when it asks, to get "root" privileges. At this point I usually have already right clicked on the "jre...bin" file and opened the properties so that I can copy the file name into the clip board (to avoid typing that long name in the Terminal Window). Or if I forgot, then I go back and do it now. Then, in the Terminal Window, do this... Run the self-extracting binary, Type: "./jre-6u<version>-linux-i586.bin" (just type ./ and then past in the exact name of your "jre...bin" file and hit Enter). This will start the installation. If it asks any questions, just answer with y for yes or A for all... Unless you see something that concerns you and you don't want to over write something. After the installation is finished, you will see Done in the Terminal window. Here's what it looked like in my Fedora 14 System...
don@RedBlackBioStar Downloads$ su
Password:
[root@RedBlackBioStar Downloads]# ./jre-6u24-linux-i586-rpm-2.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
replace jre-6u24-linux-i586.rpm? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
  inflating: jre-6u24-linux-i586.rpm 
Preparing...                ########################################### [100%]
   1:jre                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        localedata.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...

Done.
[root@RedBlackBioStar Downloads]#
 Then, Now this is the part I forgot today, which cost me several hours and allot of frustration! Follow the instructions Labeled "Enable and Configure". Remember you can bypass all of the "cd" stuff when you want to go to a different directory. Just go there in Krusader. Then you can open a Terminal window and run the Commands they give you with your directory's in the command. Here's what mine are in Fedora 14... "/usr/java/jre1.6.0_24/lib/i386" and "/home/don/.mozilla/plugins". The command to make a Symlink in my Fedora 14 "/home/don/.mozilla/plugins" Dir went like this...
don@RedBlackBioStar plugins$ su
Password:
[root@RedBlackBioStar plugins]# ln -s /usr/java/jre1.6.0_24/lib/i386/libnpjp2.so
[root@RedBlackBioStar plugins]#

Then just Close Your Web Browser (I use Firefox) and Reopen it and go to the Java JRE Test Page to see if it worked... http://www.java.com/en/download/help/testvm.xml. Then you can double check your Java JRE version by opening up a browser window and going to about:plugins. Mine is now, Java(TM) Plug-in 1.6.0_24, File: libnpjp2.so. You will most likely need to read the Instructions on the java.com page before this makes any sense to you (I've pasted the parts I'm talking about from that page below). I find this method allot faster and easier than typing everything in the Command Line. Maybe you will to...
Don
Install Note: The instructions below are for installing Java 6. If you're-installing another version, make sure you change the version number appropriately when you type the commands at the terminal.
To install the Linux (self-extracting) file
Follow these instructions:
  1. Change the permission of the file you downloaded to be executable. Type:
    chmod a+x jre-6u<version>-linux-i586.bin
  2. Verify that you have permission to execute the file. Type:
    ls -l
Make sure           the installation file has executable permission

  1. Change to the directory in which you want to install. Type:
    cd <directory path name>
    For example, to install the software in the /usr/java/ directory, Type:
    cd /usr/java/

    Note about root access: To install Java in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the Java in your home directory or a subdirectory for which you have write permissions.
  1. Run the self-extracting binary Type:
    ./jre-6u<version>-linux-i586.bin

    The license agreement is displayed. Review the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.

  2. Java is installed into its own directory. In this example, it is installed in the /usr/java/jre1.6.0_<version> directory. When the installation has completed, you will see the word Done.
The           installation completes

  1. Verify that the jre1.6.0_<version> sub-directory is listed under the current directory. Type:
    ls
Verify the           installation filename

The installation is now complete. Skip to the Enable and Configure section.


To install the Linux RPM (self-extracting) file
Follow these instructions:
  1. Become the root user by running the su command and entering the super-user password.
    At the terminal: Type:
    su
    Enter the root password.
  2. Change to the directory in which you want to install. Type:
    cd <directory>
    For example, to install the software in the /usr/java/ directory, Type:
    cd /usr/java

    Note about root access: To install Java in a system-wide location such as/usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install Java in your home directory or a subdirectory for which you have write permissions.

  3. Change the permission of the file you downloaded to be executable. Type:
    chmod a+x jre-6u<version>-linux-i586-rpm.bin

  4. Start the installation process. Type:
    ./jre-6u<version>-linux-i586-rpm.bin

    The license agreement is displayed. Review the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.

  5. The installation file creates and runs the file jre-6<version>-linux-i586.rpm in the current directory.
RPM           unpacking completes
  1. Verify that the jre1.6.0_<version> sub-directory is listed under the current directory. Type:
    ls
Verify the           installation filename

The installation is now complete. Go to the Enable and Configure section.

Enable and Configure
Firefox or Mozilla
To configure the Java Plugin follow these steps:
  1. Exit Firefox browser if it is already running.
  2. Uninstall any previous installations of Java Plugin.
    Only one Java Plugin can be used at a time. When you want to use a different plugin, or version of a plugin, remove the symbolic links to any other versions and create a fresh symbolic link to the new one.
  3. Create a symbolic link to the libnpjp2.so file in the browser plugins directory
    • Go to the plugins sub-directory under the Firefox installation directory
      cd <Firefox installation directory>/plugins

    • Create the symbolic link
      ln -s <Java installation directory>/lib/i386/libnpjp2.so


    Example
    • If Firefox is installed at this directory:
      /usr/lib/<Firefox installation directory>
    • And if the Java is installed at this directory:
      /usr/java/<Java installation directory>
    • Then type in the terminal window to go to the browser plug-in directory:
      /usr/lib/<Firefox installation directory>/plugin
    • Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
      ln -s /usr/java/<Java installation directory>/lib/i386/libnpjp2.so


  4. Start the Firefox browser, or restart it if it is already up.

    In Firefox, type about:plugins in the Location bar to confirm that the Java Plugin is loaded. You can also click the Tools menu to confirm that Java Console is there.

Test Installation
To test that Java is installed and working properly on your computer, run this test applet.


Read More...
http://www.java.com/en/download/help/linux_install.xml#rpm

Java JRE Tests
java test - Google Search
How do I manually download and install Java for my Windows computer?
How do I test whether Java is working on my computer?
Why do I need Java 6 Update 10 and above for Firefox 3.6 and later versions?
How do I clear my web browser cache?
Java Tester - Home Page -May Be Bogus! http://www.avgthreatlabs.com Whooooops! We couldn't find a currently active record of this domain. It may be currently unavailable or no longer exist.
javatester.org complaint - Google Search
Speed Test : upload and download | DSLReports.com, ISP Information
Supported System Configurations for Java SE 6 and Java For Business 6
Java Downloads for All Operating Systems - Sun Microsystems
How do I download and install Java for my Linux computer ?
About Plugins
test java - Google Search
Don

No comments: