I've installed the official Oracle Java on my Ubuntu machine. For that I did the following:
- Download the latest JRE for x64 (.tar.gz)
- Unpacked this archive on my Windows machine
- Uploaded the folder jre_1.7.0 to my Ubuntu machine (via FTP)
- Used
update-alternatives --install
andupdate-alternatives --set
to install Java
When I tried java -version
, Ubuntu said permission denied
. So I manually added the execution permission (chmod) to all files in jre_1.7.0/bin
. Then, java -version
worked:
java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
For installing Openfire (XMPP Server), which did not work, I tried the following:
- Download the latest .deb package
- Install it via
sudo dpkg -i openfire_3.8.0_all.deb
This failed due to the following dependency problem:
dpkg: regarding openfire_3.8.0_all.deb containing openfire, pre-dependency problem:
openfire pre-depends on sun-java5-jre | sun-java6-jre | default-jre-headless | openjdk-6-jre
sun-java5-jre is not installed.
sun-java6-jre is not installed.
default-jre-headless is not installed.
openjdk-6-jre is not installed but configs remain.
dpkg: error processing openfire_3.8.0_all.deb (--install):
pre-dependency problem - not installing openfire
Why doesn't it find Java? What am I doing wrong? Thanks in advance!
If you install a program from source or from a tarball as you did with java, the package management system doesn't know that it's installed. This is why it's giving you an error.
The best way to install Oracle Java in Ubuntu, in my experience is using the WebUpd8 PPa. You can find how to add it in this link. But to summarize:
As a bonus this will keep your java version updated.