Sun Java
Kipton Moravec
kip at kdream.com
Tue Apr 24 19:53:40 UTC 2012
I have a fresh install of Lubuntu.
I have a program that requires (Oricle) Sun Java.
I went to https://help.ubuntu.com/community/Java
It said:
JRE only
Only supports Oracle (Sun) Java 6 JRE (which covers the needs of 99 % of
all computer users). It pulls the packages from Oracle's website and
installs them, comparable to the way Adobe Flash Player is being
installed.
* http://www.duinsoft.nl/packages.php?t=en
So I followed the link.
And followed these instructions:
Repository
The repository provides a Debian package with the script and the same
support files as in the support tarball. Setting things up is a bit more
work, but the script will be properly integrated in your system.
Additional advantages: a possibly installed out-of-date sun-java6
installation will be removed completely and if you keep the software
source in your list, you will automatically receive updates of the
script. The procedure:
* put the line
deb http://www.duinsoft.nl/pkg debs all
in the file /etc/apt/sources.list, either using Software Sources
from your System Menu or by editing the file in an editor (as
root)
or:
put this line in a file named (e.g.) duinsoft.list in the
directory /etc/apt/sources.list.d
* import the gpg key with the command (all on one line)
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5CB26B26
* enter the commands (two lines)
sudo apt-get update
sudo apt-get install update-sun-jre
or use Synaptic to install the package
* installation of the Runtime Environment will follow
automatically
Using the script apt-add-repository -available for Ubuntu- is not
advisable because that script makes a few incorrect assumptions.
The keyserver keys.gnupg.net mentioned above is just an example. You can
use any reliable keyserver.
I think I did all this right.
So I tested.
kip at k5prk-ms:/usr/local$ java -version
The program 'java' can be found in the following packages:
* gcj-4.4-jre-headless
* openjdk-6-jre-headless
* cacao
* gij-4.3
* jamvm
This looks like OpenJDK not Sun-6-java.
So thinking something was wrong, I tried the apt-get again.
kip at k5prk-ms:/usr/local$ sudo apt-get install update-sun-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
update-sun-jre is already the newest version.
The following packages were automatically installed and are no longer
required:
libdmraid1.0.0.rc16 libicu42 libdiscover2 python-pyicu discover
cryptsetup
libecryptfs0 reiserfsprogs rdate openbsd-inetd localechooser-data
ecryptfs-utils libdebconfclient0 discover-data dmraid
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 289 not upgraded.
So it says it was already installed.
Reading the documentation again, it said I had to choose the right one
to use if multiple ones were installed.
kip at k5prk-ms:/usr/local$ sudo update-alternatives --config java
[sudo] password for kip:
update-alternatives: error: no alternatives for java.
So now I am stuck. It looks like I have openjdk installed, but apt-get
says sun-jre is installed, and it says only one java is installed.
What am I doing wrong?
Kip
More information about the ubuntu-users
mailing list