I installed OpenJDK as soon as I installed the OS.
Then I downloaded IntelliJ IDEA and tried running it. It displayed a warning that IDEA has known graphics issues with OpenJDK and that I should install Oracle JDK.
IDEA works just fine except for its poorly rendered fonts and other UI elements. I wanted to improve my user experience, and so I decided to install Oracle JDK. Googling some keywords landed me on this page.
I followed the instructions on the given page but the installation failed with this error:
$ sudo apt-get install oracle-java7-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
diffstat libclucy-clojure linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor icedtea-netx-common
dkms clojure-contrib html2text libmail-sendmail-perl libsys-hostname-long-perl clojure1.2
Use 'apt-get autoremove' to remove them.
Suggested packages:
visualvm ttf-kochi-gothic ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho ttf-arphic-uming
The following packages will be upgraded:
oracle-java7-installer
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/15.3 kB of archives.
After this operation, 3,072 B of additional disk space will be used.
Setting up oracle-java7-installer (7u3-0~eugenesan~precise4) ...
Downloading...
--2012-08-16 00:39:21-- http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 1.186.191.202, 1.186.191.200
Connecting to download.oracle.com (download.oracle.com)|1.186.191.202|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz [following]
--2012-08-16 00:39:21-- https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.57.126.174
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.57.126.174|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2012-08-16 00:39:22-- http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com (download.oracle.com)|1.186.191.202|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5307 (5.2K) [text/html]
Saving to: `./jdk-7u3-linux-x64.tar.gz'
0K ..... 100% 213K=0.02s
2012-08-16 00:39:22 (213 KB/s) - `./jdk-7u3-linux-x64.tar.gz' saved [5307/5307]
Download done.
sha256sum mismatch jdk-7u3-linux-x64.tar.gz
Oracle JDK 7 is NOT installed.
dpkg: error processing oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
Now the status is that I don't have Oracle JDK installed, and my apt-get is messed up. Running sudo apt-get upgrade gives following error:
missingfaktor@thousand-sunny:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
oracle-java7-installer
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/15.3 kB of archives.
After this operation, 3,072 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up oracle-java7-installer (7u3-0~eugenesan~precise4) ...
Downloading...
--2012-08-16 01:28:37-- http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 1.186.191.202, 1.186.191.200
Connecting to download.oracle.com (download.oracle.com)|1.186.191.202|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz [following]
--2012-08-16 01:28:37-- https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.57.126.174
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.57.126.174|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2012-08-16 01:28:37-- http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com (download.oracle.com)|1.186.191.202|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5307 (5.2K) [text/html]
Saving to: `./jdk-7u3-linux-x64.tar.gz'
0K ..... 100% 220K=0.02s
2012-08-16 01:28:37 (220 KB/s) - `./jdk-7u3-linux-x64.tar.gz' saved [5307/5307]
Download done.
sha256sum mismatch jdk-7u3-linux-x64.tar.gz
Oracle JDK 7 is NOT installed.
dpkg: error processing oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
I need that command to work for quite a few reasons. So I really have two questions:
- What do I need to do so that
apt-getfunctions as before? - How do I install Oracle JDK, and is it recommended to do so?