title: how to write shell script to get JRE version
body: <p>Hi I want to write a shell scripting which will return the installed JRE version. How to write shell script file to achieve the above.</p>
  
  <p>If I write java -version then the application returns "1.6.0_14"
  Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
  Java HotSpot(TM) Server VM (build 14.0-b16, mixed mode)".</p>
  
  <p>But I donot want any string. I want only jre version.</p>
  
  <p>thanks
  Sunil Kumar Sahoo</p>