Results 1 to 4 of 4

Thread: Is this code legit? (virus free) new to linux

  1. #1
    Join Date
    Jun 2012

    Smile Is this code legit? (virus free) new to linux

    Hello i followed an online tutorial to install the latest java.

    Could someone please take a glance at this code to see if it is actually doing what it claims it is.

    Thanks alot for your time


    Remove the browser plug-in of the old version

    First you'll want to remove the browser plug-in of the old JRE or openJDK (if you have it). Only the browser plug-in needs to be removed! Otherwise unwanted side effects may occur.

    When the old JRE has been installed manually in
    /opt/java, see the instruction at the bottom of this column (under the header Removal).

    When you don't have an old JRE, you probably have openJDK and the IcedTea browser plug-in. The IcedTea browser plug-in (icedtea-6-jre-cacao) should be removed; openJDK itself can remain on your hard disk.

    Like this:

    Click on Ubuntu Software Center (the shopping bag) in the side panel.

    Remove only the
    IcedTea Java-plug-in. Leave OpenJDK itself on your hard disk.

    Press the
    Remove button.

    Get JRE

    Get the right file from the Java website:

    For 64-bit you want
    Linux x64. The name of this file ends on .tar.gz. Do not pick Linux x64 RPM (file name ends on x64.rpm), because RPM is not built for Ubuntu, but for other Linux distro's.

    Note: Store the file in the folder Downloads. So in /home/your-user-name/Downloads. Firefox puts downloaded files there by default, but not all web browsers do it like that.

    For example: user John should place the file in/home/john/Downloads. When in doubt, check it.

    This is important for the terminal commands that you'll execute later on; otherwise they won't be correct.

    Install JRE (64-bit)

    Note: the terminal commands in this how-to possibly refer to an older version of JRE. When there's a newer version, you can simply adapt the file names in the terminal commands.

    This how-to has been written for JRE 7 update 5 (64 bit version).

    1. Create a new subfolder in the folder
    opt, by means of a command.

    Click on the grey Ubuntu logo (Dash home). Query:
    Click on Terminal.

    Type (use copy/paste: rapidly click three times on the blue line, in order to select the entire line).
    sudo mkdir -p -v /opt/java/64

    Press Enter.

    Type your password. You won't see anything, not even dots, this is normal.
    Press Enter.

    2. Now go to the Downloads folder and unpack the compressed JRE file that you just downloaded, with the following combined command.

    Type (copy/paste):

    cd Downloads && tar xvzf ~/Downloads/jre-7u5-linux-x64.tar.gz

    Press Enter.

    3. Move the unpacked contents of the JRE file into the system folder that you created in step 1, with the following command.

    Type (copy/paste):

    sudo mv -v ~/Downloads/jre1.7.0_05 /opt/java/64

    Press Enter.
    Inform the system and make the new JRE the default

    4. Now you'll want to tell the system, that there's a new Java version available.

    Type (copy/paste):

    sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.7.0_05/bin/java" 1

    Press Enter.

    Note: are you updating from a previous Java version, which you have removed manually? Then you'll need to execute the above command twice, because you'll get an error message the first time.

    5. Tell the system, that the new Java must be the default.

    Type (copy/paste):

    sudo update-alternatives --set java /opt/java/64/jre1.7.0_05/bin/java

    Press Enter.

    Install the Firefox plugin

    6. Installing the Firefox plugin is simple. First execute the following command, in order to create a certain folder (if it doesn't exist already).

    Type in the terminal (copy/paste):

    mkdir -v ~/.mozilla/plugins

    Press Enter.

    If it exists already, you'll see a notification of that.

    7. Now remove the IcedTea plugin, if it has been installed.

    Type (copy/paste):

    sudo apt-get remove icedtea-6-plugin && sudo apt-get remove icedtea-7-plugin

    Press Enter.

    If it's not there to begin with, you'll get a notification of that.

    8. Remove an older version of the Java plugin.

    Type (copy/paste):

    rm -v ~/.mozilla/plugins/

    Press Enter.

    If it's not there to begin with, you'll get a notification of that.

    9. Now you can install the plugin, by creating a symbolic link (you tell Firefox, where the plugin is located).

    Type (copy/paste):

    ln -s /opt/java/64/jre1.7.0_05/lib/amd64/ ~/.mozilla/plugins/

    Press Enter.

    Final check

    10. Now close and restart Firefox. Check whether everything has succeeded. Type in the url bar of Firefox (not in the terminal!):


    Press Enter.

    And scroll down, until you see something approximately similar to this:
    Java(TM) Plug-in 1.7.0_05

    You can also use this website:

  2. #2
    Join Date
    Sep 2011
    Ontario, Canada
    Ubuntu 12.04 Precise Pangolin

    Re: Is this code legit? (virus free) new to linux

    Looks fine, but you can just use the webupd8 ppa to install Java, its a lot easier. You read the instructions here if you want - If you don't want to read it just open terminal and issue the following commands,

    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer
    Then you should have Java 7 installed, if you want to check which version is installed run,
    java -version
    It should return with some like this,
    java version "1.7.0_04"
    Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
    Java HotSpot(TM) Server VM (build 23.0-b21, mixed mode)
    EDIT: I forgot to mention that I have used this ppa and it is safe and works fine.
    Last edited by PhantomTurtle; June 23rd, 2012 at 01:58 AM.

  3. #3
    Join Date
    Jul 2008

    Re: Is this code legit? (virus free) new to linux

    Looks like your looking at this site. I use this setup all the time as I do not like ppa's on my system from other site. If it is you are good to go.

  4. #4
    Join Date
    Jul 2007
    Magic City of the Plains
    Xubuntu Development Release

    Re: Is this code legit? (virus free) new to linux

    You could have just posted the link instead of all that text; but yes, I can vouch for cavsfan's site.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts