how to install java on ubuntu 9.04?

Asked by goldaceofspades

I am very new to ubuntu and im just starting to use this difficult to work with terminal... but when i tried to install java several times i got tired and gave up but now i am trying again and its still proving tiring. i tried to install the Linux RPM (self-extracting file) then i would go to the terminal at about part 3 it would say
blackhawkdown2000@Reggie's Computer:~$ su
Password:
root@Reggie's Computer:/home/blackhawkdown2000# cd /usr/java
bash: cd: /usr/java: No such file or directory
root@Reggie's Computer:/home/blackhawkdown2000#
but the file is right on my desktop and it dosn't want to work then i just skip to part five and it dose the same thing so i just shut it off and gave up. can anyone help me?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu sun-java6 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#1

Here is the guide for installing java in Ubuntu 9.04:

http://www.ubuntugeek.com/how-to-install-java-runtime-environment-jre-in-ubuntu-904-jaunty.html

You should avoid .rpm files, as they were made for Mandriva, Redhat, or Fedora-based distributions, NOT for Debian/Ubuntu distributions.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

do not use root access in your home directory, you may damage file ownerships. You should not have the root account enabled either for security reasons. You can di anything root can using sudo and you can get the equivelant of a root shell with sudo -i. i suggest you use this in future and strongly advise you to disable your root account.

an RPM is a redhat packaged metafile and is used in distros like Mandriva, Redhat etc and is synonymous with deb files in debian/ubuntu. You should not use these files as they are not made for your type of OS and could cause problems.

If your system is 32bit then the above link will work (You can check by running

uname -a

if you see i686 in the output then it is 32bit, if you see x86_64 then it is 64bit)

for 64bit Beta flash you can use this:

cd ~; wget http://home.comcast.net/~ubuntume/Get64bitJava-0.1.2.tar.gz; tar zxvf ./Get64bitJava-0.1.2.tar.gz; rm Get64bitJava-0.1.2.tar.gz; chmod +x Get64bitJava; sudo ./Get64bitJava; rm ./Get64bitJava

This will install the beta 64bit java that runs natively rather than via nspluginwrapper. I find it is pretty decent

Revision history for this message
goldaceofspades (susano18) said :
#3

i am still very confused on what to do but i am running a 64bit computer using the AMD phenom black edition.
and i don't know what to do with the link http://home.comcast.net/~ubuntume/Get64bitJava-0.1.2.tar.gz im sorry if this all looks easy to you guys but im really lost this is my first time using a linux os
i was able to get flash to work and i got sound to work by myself but im still lost with java

if there is a vid or something that you can show me that would help a lot

but the link the guy above me showed me only got me to

blackhawkdown2000@Reggie's Computer:~$ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
sudo: unable to resolve host Reggie's Computer
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
blackhawkdown2000@Reggie's Computer:~$

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#4

Hi,

First please make sure to close all open programs, including all package managers like Synaptic, Add/remove programs, etc ...

Then please try this procedure:

Step 1: Open Terminal from "Applications->Accessories->
Terminal"

Step 2: Please COPY-PASTE each line below into the Terminal then hit <enter> after each line)

sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo rm /var/lib/dpkg/info/*
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm /var/lib/apt/lists/*
sudo mkdir /var/lib/apt/lists/partial
sudo aptitude clean
sudo aptitude autoclean
sudo apt-get update
sudo dpkg --clear-avail
sudo dpkg --configure -a
sudo aptitude install -f
sudo aptitude update
sudo aptitude install sun-java6-jre sun-java6-plugin sun-java6-fonts
sudo aptitude dist-upgrade

Step 3: Please post results (copy/paste terminal output from each command) on this thread

Hope it helps,

Regards,

Mark

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

You don't just click on the link to the file and I strongly suggest not just clicking random links on websites as this will help the smooth running and security of your system.

If you'd actually read what I wrote you'd see each the text surrounding the link is a script so requires no clocking whatsoever. Simply copy the chunk of text and paste into a terminal and the rest will do itself.

I understand you are new to the OS but if you simply disregard half the text in a post and click on the first hyperlink you see you will have trouble.

As for you black phenon CPU. This means very little as a 64bit CPU can run a 32bit OS so you could install the 32bit version of Ubuntu and the 64bit Java plugin would not work at all. The OS dictates what is to be used, not the CPU. If you run

uname -a

You will see either x86_64 or i686. i686 means 32bit. x86_64 means 64bit.

You need to use the right plugin for your OS architecture so re-read this page carefully and you will see what is going on

Can you help with this problem?

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

To post a message you must log in.