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.
The location of my JDK installation on Windows is
C:\Program Files (x86)\Java\jdk1.8.0_40
I have added the following lines to my .bash_profile file (only this, no # signs or anything):
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"
I then start up Cygwin and type
source .bash_profile
javac -version
At which point I get the message
-bash: javac: command not found
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?