Installed Java 1.7 on Windows Server 2008. In Cygwin I can clearly see that "which java.exe" returns c:\Windows\System32\ even running "java -version" returns 1.7. But on Windows command prompt and/or Powershell it complains it is not a recognized internal or external command.
Nor I can see the file in Windows explorer in the above mentioned path. Even after changing folder options in Windows explorer.
The Java version installed is 64-bit on Windows Server 2008. It is a ditto behavior on Window 7 as well.
Does anyone know how to fix this issue?
Thank you in advance for any help.
-RG
I believe this is because your OS is 64 bits, but your installed version of Java is 32-bits. A 32-bit shell (Cygwin's bash or in my case MSYS' sh) can see and run it, but a 64-bit shell (cmd) cannot.
Try to use cygwin64, or put %JAVA_HOME%\bin at the start of PATH environment variable.Because https://superuser.com/questions/563016/why-is-java-exe-not-visible-from-cygwin-but-is-visible-from-command-prompt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With