This is replication of blog http://rootzwiki.com/topic/23008-howto-install-java-7-on-ubuntu-1204/
Here I give some brief note on how to Install Sun (Oracle) Java in Ubuntu and from How to set JAVA_HOME in Ubuntu post you can get to know how to set your JAVA_HOME appropriately.
For Ubuntu 12.04 for Java 7 ...
First in the terminal enter:
Now, Java is installed and we need to set the JAVA_HOME.Here I give some brief note on how to Install Sun (Oracle) Java in Ubuntu and from How to set JAVA_HOME in Ubuntu post you can get to know how to set your JAVA_HOME appropriately.
For Ubuntu 12.04 for Java 7 ...
First in the terminal enter:
and then install...sudo add-apt-repository ppa:eugenesan/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
This will give and error and stop...
Don't worry we can make this work :-)
Go to Oracle Java site [http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html] and download Java "jdk-7u3-linux-x64.tar.gz" directly from their site.
Now, move the downloaded file to /var/cache/oracle-java7-installer/
Don't worry we can make this work :-)
Go to Oracle Java site [http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html] and download Java "jdk-7u3-linux-x64.tar.gz" directly from their site.
Now, move the downloaded file to /var/cache/oracle-java7-installer/
sudo mv Downloads/jdk-7u3-linux-x64.tar.gz /var/cache/oracle-java7-installer/Then edit the oracle-java7-installer.postinst file:
sudo gedit /var/lib/dpkg/info/oracle-java7-installer.postinstTo edit scroll down and find the following:
echo "Downloading..."And put a # in front of the lines between "echo "Downloading..."" and "echo "Download done."" as follows:
rm -f $FILENAME
WGETRC=wgetrc wget $PARTNER_URL
|| fp_exit_with_error "download failed"
rm -f wgetrc
echo "Download done."
echo "Downloading..."
#rm -f $FILENAME
#WGETRC=wgetrc wget $PARTNER_URL
#|| fp_exit_with_error "download failed"
#rm -f wgetrcecho "Download done."
Save the file and from your terminal run:
Check it by running:
For older versions of Ubuntu (11.10 and older)...
First in the terminal enter:
sudo apt-get install oracle-java7-installerNow it works :-)
Check it by running:
java -version
For older versions of Ubuntu (11.10 and older)...
First in the terminal enter:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"and then install...
sudo apt-get update
sudo apt-get install sun-java6-jdk
sudo apt-get install sun-java6-jre
Visit How to set JAVA_HOME in Ubuntu post to get to know how you can appropriately set JAVA_HOME and PATH.
Great post.. Worked like a charm
ReplyDeleteactiva 5g mobile charger
ReplyDeleteGreat! Thanks for sharing the information. That is very helpful for increasing my knowledge in this field. Visit here piknu to comng with instagram
ReplyDelete