Home > Computers , Linux Admin , Linux desktop > Manually install Sun Java Plugin + Iceweasel on Debian Wheezy

Manually install Sun Java Plugin + Iceweasel on Debian Wheezy

Who, like me, are using Debian GNU / Linux as the operating system for your desktop, will certainly have noticed that a few months of this fantastic distribution was eliminated pack version of Java produced by SUN (now Oracle) and in its place is can use the version OpenJDK . Simultaneously disappeared also plugin for Iceweasel (the default browser installed in Debian) package related SUN (now Oracle), and instead you must use the IcedTea plugin. However, it could happen to have the need to use their own version of Java closed of Oracle and its plugin for Iceweasel and, therefore, I decided to write this guide that explains how to manually install on your desktop and use debian painlessly version closed Java. First you need to download the binary package of the ' latest version of Java from the site of the Oracle. The moment I write is available version 6 update 31. After downloading the appropriate files via browser, we proceed by opening a terminal and gaining root privileges; then you move to the directory where the binary file and attributed to him the rights to read and execute even simple for users:

$ Su
# Cd
# Chmod 755 jre-6u31-linux-x64.bin

At this point we need to run the binary file downloaded; what not before returning momentanemente user without root privileges:

# Exit
$ Sh jre-6u31-linux-x64.bin

As you will note, the execution of the binary file will only create a new subdirectory inside the files needed to run programs in java.
At this point we are ready to teach you to use Debian as its own version of Java that you just downloaded. To do this we will use the tool magnifito "update-alternatives."
Also in the terminal we regain root privileges and execute the following commands:

$ Su
# Update-alternatives --install / usr / bin / java java /<directory_binario_scaricato>/jre1.6.0_31/bin/java 1000

To verify that the installation was successful, from the terminal you can request to know the version of Java used by the command shown in the box and you should see a message like this:

$ Java -version
java version "1.6.0_31"
Java (TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot (TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

If it appears the use of another version of Java, I recommend you read this note after.

At this point we are ready to instruct the browser Iceweasel for you to use the Java plug-in comes in the package produced by Oracle. Even in this case we will use the command update-alternatives, but in quest'ltro way:

# Update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /<directory_binario_scaricato>/jre1.6.0_31/lib/amd64/libnpjp2.so 2000

Closing and reopening the browser you can type in the address bar as follows:

about: plugins

Certainly you'll see a series of plug-among them some called "Java (TM) Plug-in 1.6.0_31". At this point you can point your browser to one of the services of verification of Java plugin in use (such as this ), and verify that indeed the version used is the correct one.

In the event that you had previously installed other versions of java, you can select which one to use default among those installed by simply following the instructions that will appear by typing the command:

# Update-alternatives -config java

Or, in case you have the same necessity plugin Iceweasel, you can type the command:

# Update-alternatives -config mozilla-javaplugin.so

Did you enjoy this article? Subscribe to the newsletter to receive updates from the blog: