title: /usr/bin/alternatives command throws usage error
body: <p>I'm trying to upgrade my java installation on Oracle Linux 6.5. My VM came with jdk1.6 and I installed  jdk1.7 (via rpm). But "java -version" still shows 1.6. As root, I tried /usr/bin/alternatives. </p>
  
  <pre><code>sudo -su root    
  /usr/sbin/alternatives –install /usr/bin/java java /usr/java/jdk1.7.0_55/bin/java 17055
  </code></pre>
  
  <p>But it's not working. I'm getting a usage error but I cannot see what's wrong with my command. </p>
  
  <pre><code>usage: alternatives --install &lt;link&gt; &lt;name&gt; &lt;path&gt; &lt;priority&gt;
  ....
  </code></pre>
  
  <p>I checked the link and the path and they look good (I think).</p>
  
  <pre><code>MY-MACHINE:/usr/java/jdk1.7.0_55/bin # ls -al /usr/bin/java
  lrwxrwxrwx. 1 root root 22 Jun 12 10:37 /usr/bin/java -&gt; /etc/alternatives/java
  
  MY-MACHINE:/usr/java/jdk1.7.0_55/bin # ls -al /usr/java/jdk1.7.0_55/bin/java
  -rwxr-xr-x 1 root root 7718 Mar 17 22:05 /usr/java/jdk1.7.0_55/bin/java
  </code></pre>
  
  <p>Can anyone else see what I'm doing wrong?  Cheers.</p>