title: How to check java version at linux (RedHat6)
body: <p><a href="https://i.stack.imgur.com/90s6I.png" rel="noreferrer"><img src="https://i.stack.imgur.com/90s6I.png" alt="enter image description here"></a> I am trying to check what java version I have installed in my linux machine, I have tried: </p>
  
  <pre><code>which java 
  </code></pre>
  
  <p>and I get: </p>
  
  <pre><code>/usr/bin/java 
  </code></pre>
  
  <p>but when I type: </p>
  
  <pre><code>java -version 
  </code></pre>
  
  <p>the console is returning nothing and getting stuck in a "java mode" , feels like the command called java and its waiting for my inputs, any thing I type then returns nothing... until I type crt+C it exits the mode... </p>