Install Sun Java JDK on Ubuntu Linux

Here is the quick guide on installing the Sun Java jdk on Ubuntu Linux. I needed to do this on 10.04 server edition, but it should be the same for just about all versions. If you don’t want to do too much from the command line, substitute step 2 with: sudo gedit /etc/apt/sources.list to edit the file with gedit instead of vi.

  1. Open the terminal
  2. run: sudo vi /etc/apt/sources.list
    1. Add This Line (you can add the new line anywhere in the file):
      deb lucid partner
  3. run: sudo apt-get update
  4. run: sudo apt-get install sun-java6-jdk
Categorised as How To's