How to Install Java Runtime Environment (JRE) in Ubuntu 9.04 (Jaunty)
Sponsored Link
The language itself derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. JavaScript, a scripting language, shares a similar name and has similar syntax, but is not directly related to Java.
Currently Ubuntu has the following Java packages
sun-java6-bin -- Contains the binaries
sun-java6-demo -- Contains demos and examples
sun-java6-doc -- Contains the documentation
sun-java6-fonts -- Contains the Lucida TrueType fonts from the JRE
sun-java6-jdk -- Contains the metapackage for the JDK
sun-java6-jre -- Contains the metapackage for the JRE
sun-java6-plugin -- Contains the plug-in for Mozilla-based browsers
sun-java6-source -- Contains source files for the JDK
Installing the Java Runtime Environment
First you need to check multiverse repository enabled or not after that open a terminal window. Since you are going to be installing the JRE and the web browser plug-in, you’ll be using the following command from a terminal
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Once it downloads the packages and begins the installation, you’ll get a screen that contains the Sun Operating System Distributor License for Java and hit Enter to continue.
You’ll see a dialog that asks you if you agree with the DLJ license terms. Select Yes, and hit Enter; the JRE will finish installing.
Testing Java Runtime Environment
You’ll want to confirm that your system is configured properly for Sun’s JRE. This is a two-step process.
First, check that the JRE is properly installed by running the following command from a terminal.
java -version
You should get similar output
Testing Java Plugin for Firefox
open Firefox and typing about:plugins in the address bar and check for java plugin
Hello there…
Here it worked very well!
Thank’s a lot!
Worked Great! Thanks!
Just curious, why not openjdk?
Are these the same commands if installing on an x64 version? If not, can anyone point me in the right direction?
thanks a lot…
Great article! I triple checked by accessing http://www.java.com/en/download/installed.jsp?detect=jre&try=1 to do a test with their service. Works well in Firefox after the installation was complete!
Sun Java can be installed from Add/Remove, in case of x64 Jaunty, it will install the x64 version of Java. The plugin needs to be activated in FF by going to Java tester site at http://www.javatester.org It will then ask to install the missing plugin and you will have choice of Iced-Tea or Sun Java, select Sun Java and restart browser, you are all set. In case of Opera, no plugin is needed, Opera picks up default Java install folder on its own.
Hi
I installed, sudo apt-get install openjdk-6-jdk
is there any difference between this and SunJDK6,
Infact I did’t knew about Sun-java-6 to be installed, if both are’t for same purpose then how can I unintall openjdk?
I’m just a beginner.
Thanks much, this seems to have worked when nothing I downloaded directly from Sun or Adobe web sites seemed to. Is there a tutorial for sudo, somewhere I can learn what this command is?
sudo is just a way to run thing as root, everything you type after “sudo” will be run as the user root.
google apt-get for instructions of how to use it to install/remove software 🙂
Thanks it goes wonderfully!!!
is there anyway to upgrade the jre version to 1.6 u14
hi there
thanks for doing all thing
sorry my english!!!
Nice – except it doesn’t work on my UBUNTU 9.04.
I get the screen as shown in:
http://www.ubuntugeek.com/wp-content/uploads/2009/04/l1.png
and that’s it.
Y y yes Yes YES Ok OK CR mouseClick etc. doesn’t work at all.
Whatze zi matter?
Just found your site this week…
I picked up an HP netbook (came with Windoze) & have been fighting with a variety of installs.
Thanks for all your info here.
I found a simple work-around the problem described by self July 16, 2009.
The “Synaptic Package Manager” front end display the answerbox in a way, which accept my answers.
JRE now installed under U 9.0.4
I tried to download java using this method, but this is what happened:
matthew@matthew-desktop:~$ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
[sudo] password for matthew:
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run `apt-get -f install’ to correct these:
The following packages have unmet dependencies:
sun-java6-jre: Depends: java-common (>= 0.24) but it is not going to be installed
Depends: sun-java6-bin (= 6-14-0ubuntu1.9.04) but it is not going to be installed or
ia32-sun-java6-bin (= 6-14-0ubuntu1.9.04) but it is not installable
sun-java6-plugin: Depends: sun-java6-bin (= 6-14-0ubuntu1.9.04) but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
matthew@matthew-desktop:~$
If you could tell me what I might have done wrong or what I could do it would be very helpful (btw, im new to Ubuntu, so please make the directions simple if you can)
matthew, open a terminal window.
Write:
sudo ls
(give password – sudo remembers for app. 10 minutes, so this is cheat to let you use sudo w/o password).
Write:
sudo apt-get -f install
sudo apt-get -update
this should clean up
Start (from menu)
System > Synaptic Package Manager
Select All
Write jre in search window
This is how I worked around the problem.
– forgot to mention that sometimes you need to run
sudo apt-get -update
a couple of times.
thanks John, I finally have java!
Worked like a charm…
thanks man!
all best, java running
after i put in this –
“sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts”
– and everything was downloaded i got the screen below as you said.
http://www.ubuntugeek.com/wp-content/uploads/2009/04/l1.png
how can i get past this screen , i cant click ok or or press enter to get past it 🙁
i think this is my only problem.
thank you for help.
Paul,
that was exactly my problem too.
Kill the process using from Menu:
System -> Administration -> System Monitor
Read my above work around: ‘July 26, 2009 at 7:47 am’ + addition 7:49 am.
Works! Thanks a lot 🙂
Cheers,
Marti
very straight-forward and it worked immediately. many thanks!(^_^)
thanks. it works on my ubuntu 9.04. manuals in java.com site suckz 😀
Worked perfect for me. I needed this to edit Google apps. I couldn’t do it until I followed these instructions. Thanks.
That thing where you can’t select , just hit , see it highlighted red and hit enter, etc…
Sorry, some text missing there,
Just hit tab to higlight ok at the prompt, then hit enter and enter again at the yes promt…