This simple script will help you download and install Sun Java (JRE, JDK) 6 or 7 packages in Ubuntu 12.04 easily.
We’ve written many tutorials on this blog that show you how to install Sun Java (JRE, JDK) in Ubuntu, and this is another method to use to install these packages. I love this script better because it actually downloads and create a .dab package archive locally which allows you to install Java packages by using apt-get install commands. For more information about this script, click here.
So, if other methods are too difficult to use to install Java, then try this and see how it works.
Objectives:
Enhance your coding experience with this split keyboard that offers up to 9" of separation.
- Install Sun Java 6 and Oracle Java 7 in Ubuntu 12.04 (Precise Pangolin)
- Enjoy!
To get started, press Ctrl – Alt – T on your keyboard to open terminal. When terminal opens, run the commands below to download the script.
wget https://github.com/flexiondotorg/oab-java6/raw/0.2.4/oab-java.sh -O oab-java.sh
Next, run the command below to make the script executable.
chmod +x oab-java.sh
Then run the script below to download Sun Java 6 Packages. This will only download Sun Java 6 package.
sudo ./oab-java.sh
To download Sun / Oracle Java 7 packages, run the commands below. It’s recommended in most cases to download Java 7 Packages.
sudo ./oab-java.sh -7
After downloading either Java 6 packages, run the commands below to install Sun Java 6.
sudo apt-get install sun-java-jre sun-java-jdk sun-java6-plugin sun-java6-fonts
Or install Oracle Java 7 packages by running the commands below.
sudo apt-get install oracle-java7-jre oracle-java7-jdk oracle-java7-plugin oracle-java7-fonts
Enjoy!
Invest in some screen real estate with a new big screen, backlit monitor availabe in five different sizes and price points.
Thanks for the guide, but your script does (as with 60% of all scripts on the web) not work.
Downloading jdk-6u39-linux-i586.bin : failed
I’ll search further on..
for java6 replace
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html
with
http://www.oracle.com/technetwork/java/javase/downloads/jdk6downloads-1902814.html
6 and 7 both fail to download saying invalid host???
thanks anyway. I’m really a bit miffed because i had all this sorted prior to being turned over by windows 8 install (temporary but necessary glitch). Now I’m back with ubuntu, things seem to have changed for the worse.
Doesn’t work and Black-Bytes suggestion doesn’t fix it (although it seems to get farther).
Save yourself the the trouble and just go hear for instructions that work:
https://help.ubuntu.com/community/Java
Hi
This script is working fine.
Please replace the first script. Because the version of the script has been changed.
wget https://github.com/flexiondotorg/oab-java6/raw/0.2.4/oab-java.sh -O oab-java.sh
with
wget https://github.com/flexiondotorg/oab-java6/raw/0.2.7/oab-java.sh -O oab-java.sh
If you are still getting error in installing, update the repository by
apt-get update
then install the package.
For more you can visit this website https://github.com/flexiondotorg/oab-java6#readme
I get the following at the very end:
ERROR! Packages failed to build.
Hi There, the script failed to install 7 debs because defoma was not a valid package for Ubuntu 13. After removing defoma it appears to be working.
Worked perfectly for installing Oracle-Java7, after going to github/flexiondotorg and finding the latest version (currently 0.28). If you get ‘invalid host’ errors, try making sure you are using an up to date version.
that’s great and all
but how do I invoke sun6 jre from command line for starting pesky old timey jars like runescape clones? The right click menu is populated with sun6 java but that has no joy
Hur man vinner på Baccarat Använda Flat Betting