If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!
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





Hi…
Here are some packages are given for the JRE Installation in Ubuntu….
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
Apart from that use the following code in terminal to test the JRE…
root@username-desktop:-#java -version
java version “1.6.0_15″
Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
Java HotSpot(TM) client VM (build 14.1.-b02,mixed mode, sharing)
root@username-desktop:-#
Anyway Thanks for sharing this information here…!!
After thease instructions bla bla bla and sudo this an sudo that my NEW wersion of JAVA is :
~$ java -version
java version “1.6.0_0″
OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-1ubuntu3)
OpenJDK Server VM (build 14.0-b16, mixed mode)
It seems that JAVA more than 1.6.00 cant bee installed on ubuntu ….. eany version
Sorry for my bad english.
can’t use ubuntu 9.10
crash after crash
Ricki, Try a fresh install (not the update) you will need the live CD to do that. The best set-up I found is with three partitions, 1 for /root (mount point “/”) at least 20 gig, another for /home (mount point “/home”) as big as you can get, and one for SWAP, twice the size of your RAM. If your are dual booting with Windows make sure you don’t screw with the Windows partition. Format all the other partitions to ext4.
Remember that after you install it’s up to you to get your sound and video to work. This is because of the “OpenSource” philosophy of not supplying non-free software. Some video drivers, Flash and some sound codex (like MP3) are not open source.
(that is the part that upsets a lot of people that try to upgrade and then sound and video don’t work), this is Linux, OpenSource, not Windows.
Opps, I forgot, all partitions formated to ext4 WILL NOT BE AVAILABLE to Windows! If you want a shared partition it must be either FAT32 or NTFS.
Theres a great “How-To” for sound on this site (Ubuntugeek),
http://www.ubuntugeek.com/sound-solutions-for-ubuntu-904-jaunty-users.html
It works every time I use it (even though it says it’s for 9.04 it works for 9.10)
JRE 1.6.0 Update 15 from the repositories is old. Best way is to download the selfextracting Linux bin of JRE (Update 17 is the actual one) from http://www.java.com
After that do
fakeroot make-jpkg jre-6u17-linux-i586.bin
to create a .deb of if. The .deb can be installed with the normal sudo dpkg -i or sudo aptitude install way.
Use openjdk, it’s under gnu gpl.
Great stuff, thanks. Fresh Ubuntu 9.10. installed acro reader from adobe site, online. Worked great…
Tried creating the package with java-package, the .deb it creates installs on Karmic but it gives an error. Also doesn’t install the plugin.
The following packages have unmet dependencies.
sun-java6-plugin: Depends: sun-java6-bin (= 6-15-1) but 6-16-0ubuntu1.9.04 is to be installed
E: Broken packages
Help anyone?
Don’t think it is a broken package. Seems like the sun-java6-plugin has not been updated to the same version as the sub-java6-bin in the package repositories. I have the same problem and would really like to see the java-plugin to be updated.
uJared…
sudo apt-get remove sun-java6-jre sun-java6-plugin sun-java6-bin sun-java6-fonts
sudo apt-get autoremove
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
I can’t get it to continue after it says Configuring sun-java6-jre. I press enter but it doesn’t do anything. I’m stuck at the license agreement.
Well, I followed the instructions but it does appear that Sun has deleted the file from where ever the command fetches the file from… leaving me unable to play NES, GameBoy, GameBoy Color, TurboGrafx 16, Master System, and Apple II games from Vizzed D: I REALLY hope someone patches this up soon. Seriously, it’s painful not being able to play the games because of this.
I develop java applets and the fact that the java-plugin isnt updated makes ubuntu karmic virtually unusable for that task.
I had this problem too, and telperion’s solution worked for me. Try it.
To explain it further: The error messages mean that you have sun-java6-bin version 6-16-0ubuntu1.9.04 installed, which was built for jaunty (9.04) but is a newer version of Java than what is in the repository for karmic, namely version 6-15-1. (I’m not sure where that newer version came from, but I had it too. I probably tried to update my Java from some third-party .deb back when I was running jaunty and then forgot about it.) Anyway, the sun-java6-plugin package wants the karmic version of sun-java6-bin, not the newer version, but apt will not automatically downgrade for you. The commands telperion shows will remove java 6-16-0 and replace it with a consistent 6-15-1.
Rolando: When you get to the license agreement, hit Tab to highlight the OK button, THEN hit enter.
I’m sure you could also get a newer version of Java from Sun as cYbercOsmOnauT mentions, but it’s simpler to use the one packaged with karmic if that one is recent enough for your needs.
Just do:
sudo aptitude install sun-java6-plugin
It will automatically figure out the solution. In my case it was to downgrade from 6-16-0ubuntu1.9.04 to 6-15-1. It is in general better to use aptitude instead of apt-get.
Hey TieMann, I was facing the same problem as Rolando and I didn’t know how to proceed further. Thanks for the tip.!
Cheers!
@don1500 -- I am not sure whether this plugin works for ext4 partitions, but there is a windows add-on which allows windows to access ext2/3 partitions using ext2 techniques (non-journaling). This machine I am using right now has a jointly shared “home/my documents” folder between Ubuntu and WinXP. It’s kind of cool, but I have decided sharing the home directory isn’t really worth the trouble.
Nonetheless, the point is that there are extensions to allow windows to operate ’safely’ on extX partitions.
H C M + Rolando:
try the ‘tab’ command