PDA

View Full Version : [ubuntu] Can't install Java!



Howard Roark
September 29th, 2010, 06:03 AM
Downloaded Java jre-6u21-linux_i586-rpm.bin and the terminal tells me
could not find package
I know it's on desktop and in downloads but terminal tells me it can't find file; why?
Thanks!
Howard

razhov
September 29th, 2010, 06:48 AM
That's because it is NOT a Debian package, but a self-extracting "bin".

If you are not particular in your preference of the minor version, I suggest you install from the Ubuntu repository, not from Sun.

But if you require this EXACT version, then you can "sh" on the bin. But beware hte JDK will then NOT be managed by the package manager -- use at your own risk, you have been warned.

tommcd
September 29th, 2010, 06:55 AM
To install Java Runtime Environment (JRE) on Ubuntu 10.04 you have to add the Ubuntu Parter repo to your sources. See this:
http://www.ubuntugeek.com/how-install-sun-java-runtime-environment-jre-in-ubuntu-10-04-lucid-lynx.html
You can also add the Partner repo by going to: system > administration > software sources, and clicking to add the Partner repo. Then click the reload button when prompted.

tommcd
October 1st, 2010, 07:23 AM
If you have problems with the: "sudo add-apt-repository" command, then just go to: system > administration > software_sources. Then click the "Other Software" tab and check the Partner repo. Then click the reload button when prompted and you should be able to install java.

Howard Roark
October 3rd, 2010, 08:07 PM
When I Go to Sys>Admin>software_sources>other_software I get this

When I click on which ever of the sources I want I get

Enter the complete APT line of the repository that you want to add as source

When I type the apt line from the repository that I clicked on I don't get the add button highlighted so I must be doing something wrong but I don't know what!!!
Thanks Howard

lykeion
October 4th, 2010, 04:52 PM
Looking at your screenshot I can see that you've already partner repository. Good that's step 1. Now all you have to do is

Start Ubuntu Software Center (in the Applications menu).
Search for "sun jre"
Install "Sun Java(TM) Runtime Environment (JRE) 6" (sun-java6-jre)

Howard Roark
October 4th, 2010, 07:24 PM
according to the Ubuntu Software Center I already Have the file but when I go to Tools>Ad-ons>Find Updates I get the second of the two attachments

ANew
October 4th, 2010, 07:45 PM
use openJRE from repositories

lykeion
October 5th, 2010, 09:07 AM
use openJRE from repositories
Why should he install "openJRE"?

Regarding Find updates not showing a green thumb for Java plugin. This doesn't mean that Java isn't working.
You could go to any site using Java to verify that it's working, like this page:
http://www.w3.org/People/mimasa/test/object/java/jar-nest1

You can check that Java is enabled here
http://www.javatester.org/enabled.html

Or using JavaScript (paste this into address bar):

javascript:document.write("Is Java enabled? " + navigator.javaEnabled() )

ANew
October 5th, 2010, 07:27 PM
Why should he install "openJRE"?



It's the same as Java? i understand that in 10.04 Java was replaced by openJRE/iced tea.

tommcd
October 6th, 2010, 04:12 AM
according to the Ubuntu Software Center I already Have the file but when I go to Tools>Ad-ons>Find Updates I get the second of the two attachments

Howard,
Post the output of:

aptitude search sun-java
An "i" before a package indicates that it is installed. A "p" before a package indicates it is purged (i.e., not installed). A "B" indicates broken dependencies that need to be fixed.