Advertisement
shokti

Ubuntu 12.04 - Install Oracle Java JDK 7

Sep 19th, 2012
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.15 KB | None | 0 0
  1. go to http://www.oracle.com/technetwork/java/javase/downloads/index.html and download or use command below:
  2.     wget http://download.oracle.com/otn-pub/java/jdk/7u7-b10/jdk-7u7-linux-i586.tar.gz
  3.  
  4. extract the package:
  5.     tar -xvf ~/Downloads/jdk-7u7-linux-i586.tar.gz
  6.  
  7. create a folder for Java JDK files and folders by running the commands below:
  8.     sudo mkdir -p /usr/lib/jvm/jdk1.7.0
  9.  
  10. move all the JDK files and folders to the new location by running the commands below:
  11.     sudo mv jdk1.7.0_07/* /usr/lib/jvm/jdk1.7.0/
  12.  
  13. copy and paste each command as shown below one-at-a-time to enable Java JDK:
  14.     sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
  15.  
  16.     sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
  17.  
  18.     sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
  19.  
  20. create a Mozilla plugins folder in your home directory:
  21.     mkdir ~/.mozilla/plugins/
  22.  
  23. create a symbolic link to your Mozilla plugins folder. For 64-bit systems, replace ‘i386’ with ‘amd64’:
  24.     ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement