title: how to tell which java version cgywin use?
body: <p>i have cgywin and java 7 installed on window 7, also updated the system environment variable to point to the right java version, however when I run commands in cgywin, I m not sure which java it use, here is the commands and results:</p>
  
  <pre><code>$ java -version
  java version "1.7.0_09"
  Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
  Java HotSpot(TM) Client VM (build 23.5-b02, mixed mode)
  
  $ javac -version
  javac 1.7.0_17
  
  $ which java
  /cygdrive/c/Windows/system32/java
  
  export 
  declare -x JAVA_HOME="C:\\Program Files\\Java\\jdk1.7.0_17"
  </code></pre>
  
  <p>why all the versions are different? </p>