Difference between revisions of "Installing Java on Ubuntu 12.04 x86 64 Desktop"

From Notes_Wiki
(Created page with "<yambe:breadcrumb>Ubuntu|Ubuntu</yambe:breadcrumb> =Installing Java on Ubuntu 12.04 x86 64 Desktop= To install Java on Ubuntu 12.04 x86_64 Desktop use following steps: # Down...")
 
m
Line 1: Line 1:
<yambe:breadcrumb>Ubuntu|Ubuntu</yambe:breadcrumb>
[[Main Page|Home]] > [[Ubuntu]] > [[Installing Java on Ubuntu 12.04 x86 64 Desktop]]
=Installing Java on Ubuntu 12.04 x86 64 Desktop=


To install Java on Ubuntu 12.04 x86_64 Desktop use following steps:
To install Java on Ubuntu 12.04 x86_64 Desktop use following steps:
Line 15: Line 14:
#:</pre>
#:</pre>
#Open a new terminal and verify that oracle java installed in /opt has highest priority using '<tt>which java</tt>'.
#Open a new terminal and verify that oracle java installed in /opt has highest priority using '<tt>which java</tt>'.
[[Main Page|Home]] > [[Ubuntu]] > [[Installing Java on Ubuntu 12.04 x86 64 Desktop]]

Revision as of 07:00, 31 March 2022

Home > Ubuntu > Installing Java on Ubuntu 12.04 x86 64 Desktop

To install Java on Ubuntu 12.04 x86_64 Desktop use following steps:

  1. Download java-sdk with netbeans from http://www.oracle.com/technetwork/java/javase/downloads/index.html Download .sh file.
  2. Give execute permissions to .sh file using 'chmod +x jdk-7u40-nb-7_3_1-linux-x64.sh'. In this and all future steps replace the version of java and netbeans with the version of java and netbeans downloaded appropriately.
  3. Execute setup using 'sudo jdk-7u40-nb-7_3_1-linux-x64.sh' or similar command based on version downloaded.
  4. Choose to install both jdk and netbeans in '/opt/jdk1.7.0_40' and '/opt/netbeans-7.3.1' etc. instead of installing in '/usr/local'. Again name of folders inside opt may differ based on java and netbeans versions.
  5. Check for currently installed java versions using 'java' command. If some other java is already installed, uninstall it using package managers.
  6. Edit file '/etc/bash.bashrc' and append following lines at the end:
    JAVA_HOME=/opt/jdk1.7.0_40
    JRE_HOME=/opt/jdk1.7.0_40/jre
    PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
  7. Open a new terminal and verify that oracle java installed in /opt has highest priority using 'which java'.




Home > Ubuntu > Installing Java on Ubuntu 12.04 x86 64 Desktop