title: JDK in Cygwin problems: JAVA_HOME and PATH correct?
body: <p>The question I have has been asked many times before on this site and all around the web. I have tried all the hints and suggestions I found in all those answers, and I still cannot manage to get things running. I want JDK to run in my Cygwin installation (Cygwin installed on a Windows 64 bit machine). I did not install the Linux JDK installation, but the Windows one, so the issue is in my opinion not there. </p>
  
  <p>The location of my JDK installation on Windows is </p>
  
  <pre><code>    C:\Program Files (x86)\Java\jdk1.8.0_40 
  </code></pre>
  
  <p>I have added the following lines to my .bash_profile file (only this, no # signs or anything):</p>
  
  <pre><code>    export JAVA_HOME="/cygdrive/C/Program Files(x86)/Java/jdk1.8.0_40/"
      export PATH=$PATH:"/cygdrive/C/Program Files(x86)/Java/jdk1.8.0_40/bin"
  </code></pre>
  
  <p>I then start up Cygwin and type </p>
  
  <pre><code>    source .bash_profile
      javac -version
  </code></pre>
  
  <p>At which point I get the message</p>
  
  <pre><code>    -bash: javac: command not found
  </code></pre>
  
  <p>I've tried a dozen variants of the code (the internet is full of partially contradictory ideas), none have worked. Should I start to mess around in the .bashrc file as some sites suggest? Does anybody have an idea what I'm doing wrong?</p>