This question already has an answer here:
I'm using Ubuntu 12.04 LTS. I'm trying to install Oracle JDK 7. When I tried to directly download the jdk-7u51-linux-x64.tar.gz from the official website, the download started and after downloading couple of MBs it stopped (you can try it as well, worked the same way for a friend). Using a guide.
led me to
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)
which is normal, as it is downloading from the same link. Exact report here
I tried to download and install the .rpm file. I converted it to deb and installed it. It appears as installed in the Software center, but could not find it via terminal (java -version returns suggestions for installing packages). Image from the Software center here
I tried everything here.
and could not find anything on the internet.