Ubuntu 11.x 12.x how to install java jdk7 online
This article mainly explains "ubuntu 11.x 12.x how to install java jdk7 online", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "ubuntu 11.x 12.x how to install java jdk7 online" bar!
1. The method to install java jdk under ubuntu is as follows
Sudo add-apt-repository ppa:eugenesan/javasudo apt-get updatesudo apt-get install oracle-java7-installer
However, the following errors are often encountered in the execution of the third command
Sha256sum mismatch jdk-7u3-linux-x64.tar.gz
And prompt
Java was not installed
2. Download the deb version of jdk under ubuntu at http://www.oracle.com/technetwork/java/javase/downloads/index.html
Copy the deb installation package to the / var/cache/oracle-java7-installer/ directory
Execute the following command to edit the online installation script for jdk
Sudo gedit / var/lib/dpkg/info/oracle-java7-installer.postinst
Find the following paragraph
Echo "Downloading..." Rm-f $FILENAME WGETRC=wgetrc wget $PARTNER_URL | | fp_exit_with_error "download failed" rm-f wgetrc echo "Download done."
Modify to
Echo "Downloading..." # rm-f $FILENAME # WGETRC=wgetrc wget $PARTNER_URL # | fp_exit_with_error "download failed" # rm-f wgetrc echo "Download done."
Save.
4. Finally, execute the following command again
Sudo apt-get install oracle-java7-installer
Now you can install it smoothly.
Thank you for your reading, the above is "ubuntu 11.x 12.x how to install java jdk7 online" content, after the study of this article, I believe you on ubuntu 11.x 12.x how to install java jdk7 online this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!