download and install sun java run time environment

Asked by m singh on 2007-10-08

i am a novice only and don't know how to download and install latest sun java run time environment probably version 6. earlier i tried the add and remove applications option and through it and older version was downloaded by this application which is not suitable for the particular sites that i want to use it for
then i tried to download it directly from sun's website and then i got confused regarding suitability of a particular version and then i tried to download all the linux versions but after downloading i failed to install it i don't know what to do it is very easy in windows and since i have a dual boot computer i tried and successfully installed it help.....

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2013-04-08
Last reply:
2013-04-24
m singh (deep-maan80) said : #1

i would like to which is the suitable version of sun jre for ubuntu feisty fawn and then how and from where to download and install it and finally apply it in easy way

Cynthia Jeness (cynthiajeness) said : #2

What I normally do with regard to java is the following:

1. Go to the Sun site and select the latest version for download.
2. Pick "Linux Self-Extracting File".
3. After it downloads, I move the downloaded file to the directory where I normally store Java. Since I am a Java developer, I have a number of different versions for testing. in my case, I use "/usr/local/java".
4. Then I change the permission on the file to make it executable:

chmod a+x jdk-6u3-linux-i586.bin

In this case, "jdk-6u3-linux-i586.bin" is the name of the file that I downloaded.

5. Then I execute the self-extracting file. The following command works if you are in the same directory as the "*.bin":

./jdk-6u3-linux-i586.bin

6. Read through the license agreement which is displayed and answer "yes". The program will then unpack the components.
7. To keep my life simple, I normally make a soft link to the directory that the extraction creates: e.g., to call the directory "j2sdk":

ln -s jdk1.6.0_03 j2sdk

I do this so that I can download a different version and simply change the link to try it out before committing to it.

7. I then add the path to the java executable to my Linux "PATH". In the case of Suse or Redhat, I edit my ".profile" to change the line thsat includes "export PATH..." so that it includes the following:

export PATH=/usr/local/java/j2sdk/bin;...

8. To test the version, I type:

java -version

There may be some GUI ways to do this, but I prefer to understand exactly what changes are required to make things work so that it is portable from one OS to the next. You noted that the Windows install is easy. That my be the case; however, it is somewhat inefficient since Java needs to make 3 copies of the executable because of the way that Windows works. Further, if you want to have multiple versions of the JVM, then it is necessary to change the Windows environment variables to select the correct version.

Cindy Jeness

corenominal (corenominal) said : #3

Hi m singh,

There is an official meta-package that will install Sun Java and other non-free extras such as flash and additional audio codecs. From what I can remember it is called ubuntu-restricted-extras. To install, open a terminal and enter the following command:

sudo apt-get install ubuntu-restricted-extras

Hope this helps :-)

danielgd (danielgd) said : #4

Or you can install directly Java6 package, instead of full meta-package.
It is called sun-java6-jre, search it in Synaptic, double-click on it and apply changes.

From command line:
sudo apt-get install sun-java6-jre

m singh (deep-maan80) said : #5

i have already tried it and it is installed but when i go to sun java download site and try to verify it the message i see is older version 1.6.0 and latest is 6 update 3

Philip Newborough <email address hidden> wrote: Your question #14757 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/14757

Philip Newborough proposed the following answer:
Hi m singh,

There is an official meta-package that will install Sun Java and other
non-free extras such as flash and additional audio codecs. From what I
can remember it is called ubuntu-restricted-extras. To install, open a
terminal and enter the following command:

sudo apt-get install ubuntu-restricted-extras

Hope this helps :-)

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/14757/+confirm?answer_id=2

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/14757

You received this question notification because you are a direct
subscriber of the question.

---------------------------------
Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.

m singh (deep-maan80) said : #6

first of all thanks for help
 i tried this and from sun java's site i downloaded linux self extracting file of 18.23 mb size and
directly saved it to user/java/jre-6u3-linux-i586.bin
then i changed the permission by typing
chmod a+x java/jre-6u3-linux-i586.bin and it worked
then i executed it i typed ./java/jre-6u3-linux-i586
an agreement was displayed to which i entered yes and then certain files were unpacked
i typed export PATH=/user/java/jre-6u3-linux-i586.bin
then i don't what happened i closed the mozilla and restarted it and again tried to verify from sun java' site to find the same message again that it is an older version6.1.0 and latest is 6 version 3
i think it was downloaded ok but not properly installed and applied and there was some mistake into its application.
tell me what to do?
Cynthia Jeness <email address hidden> wrote: Your question #14757 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/14757

    Status: Open => Answered

Cynthia Jeness proposed the following answer:
What I normally do with regard to java is the following:

1. Go to the Sun site and select the latest version for download.
2. Pick "Linux Self-Extracting File".
3. After it downloads, I move the downloaded file to the directory where I normally store Java. Since I am a Java developer, I have a number of different versions for testing. in my case, I use "/usr/local/java".
4. Then I change the permission on the file to make it executable:

chmod a+x jdk-6u3-linux-i586.bin

In this case, "jdk-6u3-linux-i586.bin" is the name of the file that I
downloaded.

5. Then I execute the self-extracting file. The following command
works if you are in the same directory as the "*.bin":

./jdk-6u3-linux-i586.bin

6. Read through the license agreement which is displayed and answer "yes". The program will then unpack the components.
7. To keep my life simple, I normally make a soft link to the directory that the extraction creates: e.g., to call the directory "j2sdk":

ln -s jdk1.6.0_03 j2sdk

I do this so that I can download a different version and simply change
the link to try it out before committing to it.

7. I then add the path to the java executable to my Linux "PATH". In
the case of Suse or Redhat, I edit my ".profile" to change the line
thsat includes "export PATH..." so that it includes the following:

export PATH=/usr/local/java/j2sdk/bin;...

8. To test the version, I type:

java -version

There may be some GUI ways to do this, but I prefer to understand exactly what changes are required to make things work so that it is portable from one OS to the next. You noted that the Windows install is easy. That my be the case; however, it is somewhat inefficient since Java needs to make 3 copies of the executable because of the way that Windows works. Further, if you want to have multiple versions of the JVM, then it is necessary to change the Windows environment variables to select the correct version.

Cindy Jeness

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/14757/+confirm?answer_id=1

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/14757

You received this question notification because you are a direct
subscriber of the question.

---------------------------------
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!

ChrisBlack (chris-lotuscat) said : #7

One potential source of confusion for you is that Java 1.6.0 == Java 6. Sun kind of screwed around with the version naming and since java 1.5 == java 5 it has been this way. I normally use the sudo apt-get install sun-java6-jre method of installing. No need to mess with downloading the binary packagins from Sun.

lamyseba (lamyseba) said : #8

@ChrisBlack: It seems the sun-java6-jre is not the latest version of java. latest is update3

Launchpad Janitor (janitor) said : #10

This question was expired because it remained in the 'Open' state without activity for the last 15 days.