Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try this:</p> <ol> <li>Download the Java SDK into $HOME/archives (e.g., $HOME/archives/jdk-6u16-linux-x64.bin).</li> <li>Extract Java into /opt (or another location if you do not want to use root). For example:</li> </ol> <pre class="lang-sh prettyprint-override"><code>cd /opt chmod 755 $HOME/archives/jdk-6u16-linux-x64.bin sudo $HOME/archives/jdk-6u16-linux-x64.bin&lt;/code&gt; </code></pre> <ol> <li>Create a symbolic link (to ease upgrades):</li> </ol> <pre class="lang-sh prettyprint-override"><code>sudo ln -s jdk1.6.0_16 jdk </code></pre> <ol> <li>Edit <code>$HOME/.bashrc</code></li> <li>Append the following lines:</li> </ol> <pre class="lang-sh prettyprint-override"><code>JAVA_HOME=/opt/jdk PATH=$PATH:$JAVA_HOME/bin </code></pre> <ol> <li>Reload the environment variables:</li> </ol> <pre class="lang-sh prettyprint-override"><code>source $HOME/.bashrc </code></pre> <p>You should now be able to compile programs.</p> <p>I prefer this method to installing the managed package because uninstalling (or upgrades) never seems to remove all bits of the SDK flawlessly, and it seems to hinder installing multiple versions of the Java Software Development Kit on the same machine at the same time. I have had issues with <code>apt-get</code> and Java in the past. Also, this method allows me to be absolutely certain which version of Java is in use at any time.</p> <p>If you are not comfortable using <code>root</code> and <code>/opt</code>, you can use your own account and <code>$HOME/bin/jdk</code> instead. Change the <code>.bashrc</code> file accordingly.</p> <p>Remove any version of Java you previously had installed. You might need to restart your terminal session.</p> <p>This works for all versions of Java since at least Java 1.2.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload