installing Java

Asked by xell

I want to install Java on my computer...
And there is following instruction:

Follow these instructions:

   1. At the terminal: Type:
   2. Enter the root password.
   3. Change to the directory in which you want to install. Type:
      cd <directory path name>
      For example, to install the software in the /usr/java/ directory, Type:
      cd /usr/java/

      Note about root access: To install the JRE in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the JRE in your home directory or a subdirectory for which you have write permissions.
   4. Change the permission of the file you downloaded to be executable. Type:
      chmod a+x jre-1_5_0-linux-i586.bin
   5. Verify that you have permission to execute the file. Type:
      ls -l

Make sure the installation file has executable permission

   6. Start the installation process.Type:

      This displays a binary license agreement. Read through the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.

type YES to agree to the license agreement

   7. The JRE is installed into its own directory. In this example, it is installed in the /usr/java/jre1.5.0 directory. When the installation has completed, you will see the word Done.

The installation completes

   8. The JRE is installed in jre1.5.(version number) sub-directory under the current directory. In this case, the JRE is installed in the /usr/java/jre1.5.0 directory. Verify that the jre1.5.0 sub-directory is listed under the current directory. Type:

Verify the installation filename

The installation is now complete. Skip to the Enable and Configure section

I have question to you:
1. What is this terminal?? when can i find it??

Question information

English Edit question
Ubuntu yelp Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Poul Sander (ubuntu-poulsander) said :

In Ubuntu it must be done slightly different, since "su" is disabled by default plus these instructions ain't complete. Basicaly you need to write sudo in front of all commands but "cd" and "ls"

I use a different language, but the "Terminal" is located in the menu just above "Add applications" in the "Programs" menu in the cornor.

The newest version of java can't be installed using apt-get, so I did this:
Download the jre_something.bin from, save it to the Desktop (or a place you remember)
Give it executing permissions be right clicking it and chose "Properties" -> "Rights"
Upen a terminal (or Konsole in KDE)
I used these commands:
cd /
sudo mkdir opt
(Enter password when promted)
cd opt
sudo mv ~<your user name, without "<" and ">">/Desktop/java_something.bin ./
sudo ./java_something.bin

Your guide needs the following imnportant steps, the new java version wont be used without:

cd /usr/bin
sudo ln -s /opt/jre1.5_05/bin/java (your version might be different)
cd ~/.mozilla/plugins (no sudo)
ln -s /opt/jre1.5_05/plugin/i386/ns7/ (sudo not used because ~ is your home folder)

Hope this helps

I need a relevant question answered: How do you add the to all users, so i don't need linking it to.

Revision history for this message
Kevin Cole (kjcole) said :
Revision history for this message
Aldous PeƱaranda (dous) said :

You may also choose to use Synaptic to install any of the free java runtimes that are available such as kaffe, sablevm, jamvm, etc.

I hope that helps.

Revision history for this message
Tony Yarusso (tonyyarusso) said :

Actually, as of Breezy, gnome-terminal is in the menu at Applications > Accessories > Terminal. You can also get to a virtual console terminal with Ctrl-Alt-F(1-6) (CAF7 to get back to the desktop).

Revision history for this message
James Stansell (jamesstansell) said :

The java documentation is currently at and shows you how to use make-jpkg to install Sun's JRE.

Poul, I believe this procedure will add the Java Plugin all users.

If the above documentation link doesn't still have the JRE installation information, you can also find it in the by searching for make-jpkg in the text of the pages.

Revision history for this message
foxjazz (foxr1) said :

james, none of that seemed to work.

I have been trying to install Java all night. I ran the bin file (used su) And it put the directories out under /usr/Java (where I ran the bin).
However it's still not right.

Any ideas on getting the full Java including dev environment?

Revision history for this message
James Stansell (jamesstansell) said :

Hi foxjazz -

This page is a bit outdated since it was written for ancient versions of Ubuntu, (it's a little surprising that the page isn't updated either; I guess the current starting point will be

Ubuntu 6.06 LTS and above all have sun-java5-* and sun-java6-* packages. For the full dev environment you'd want the sun-java6-jdk package. (and/or the java5 version, depending on your needs.)

Here's the main help page: Unfortunately it's even a little out of date, but the first line has this link which is up to date.

Let us know if those instructions don't help you.


Revision history for this message
James Stansell (jamesstansell) said :

Actually, the -jdk package doesn't include the full development
documentation. There's a separate package to install it, but you still need
to manually download the doc archive from for it. I expect
that to change as Java 7 starts to mature.

Revision history for this message
foxjazz (foxr1) said :

Thanks I found this article about installing Java:

Than I ran the

sudo update-alternatives --config java

command and walla, I finally got Java on my Ubuntu

Revision history for this message
vinceboy (codebyter) said :

I have also a problem with my Sun Java 6 Console it also render a blank window....
here's a link that show both NetBeans and Java Console Render only blank screen

Revision history for this message
James Stansell (jamesstansell) said :

Java 6.0u2 has been released and may address the problem, but the only
package I know of is for gutsy (the upcoming ubuntu 7.10 release.) Would
you be able to try the non-packaged version from Sun? Or would you be able
to try the gutsy tribe release? (I don't know if the package made it in the
latest tribe - if not then you'd need to pull in updates.)



Revision history for this message
shahidul hoque (tdr00) said :


Can you help with this problem?

Provide an answer of your own, or ask xell for more information if necessary.

To post a message you must log in.