

Let's revert the browser plugin changes too: Sudo apt-get install openjdk-6-jdk icedtea-pluginĪnd select the "java-6-sun-1.6.0.26" ("java-6-sun" works too) for Oracle JDK or the "java-1.6.0-openjdk" folder for OpenJDK. Update 15 December, 2011: Sun Java is no longer available in the older Ubuntu repositories either so the only alternative is to install OpenJDK instead:

Ln -s /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/ Ln -s /usr/lib/jvm/java-7-oracle/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/ Sudo rm -f /usr/lib/firefox/plugins/libnpjp2.so /usr/lib/firefox/plugins/libjavaplugin_oji.soĪnd for the last step, let's create a simbolic link for the newly installed Java into the Mozilla plugins directory: Rm -f ~/.mozilla/plugins/libnpjp2.so ~/.mozilla/plugins/libjavaplugin_oji.so But in case it doesn't show up in your browser, here's what to do.Įven though the steps below are for Firefox, the plugin will also be updated in Chrome (possibly other browsers too) as it looks under ~/.mozilla/plugins folder for plugins too.įirstly, remove old Java plugin links using the commands below: The Java browser plugin should be installed automatically. The script will ask you to select the Java version - select "java-7-oracle" for Oracle Java JDK 7, click OK and wait for it to finish: Now run the following command in a terminal to install Oracle Java JDK: The script may work with other Linux distributions, but it has only been tested on Ubuntu.Ĥ. If you don't want to add the WebUpd8 PPA, you can also manually download the script. Sudo add-apt-repository ppa:nilarimogard/webupd8 Install Update Java package created by Bruce Ingalls (packages available for Ubuntu 11.10, 11.04, 10.10 and 10.04): Sudo mkdir -p /usr/lib/jvm/ #just in caseģ. Extract the downloaded Oracle Java JDK archive in your home folder and rename the newly created folder to "java-7-oracle" - we must move this folder to /usr/lib/jvm using the following commands:

You can use these instructions for older JDK versions too, but make sure you use the appropriate folder names, etc.Ģ. tar.gz package for your computer architecture - or jdk-7-linux-圆4.tar.gz these filenames are just examples, they will change on future releases). Download the latest Oracle JDK 7 from HERE (you must click "accept license" and then download the. The installation instructions below only work for Oracle JDK.ġ. Warning: JDK 7 is available as a developer preview release, so use it at your own risk.įor the installation we'll be using an old script created by WebUpd8 reader Bruce Ingalls which I've updated to work with the latest Oracle JDK 7 (just a minor modification).
