I'm trying to execute a Java file I was given on Windows 10, inside of the Bash shell.

I open my command prompt. I enter bash.

I set JAVA_CALL="C:/Program Files/Java/jdk1.8.0_192/jre/bin/java"

I try to execute the call, but to no luck. I read several threads on here and tried several things. I made sure my path includes both the Program Files x86 and the regular Program Files version of my JAVA.

I executed sudo ln -s -f /mnt/c/Program\ Files/Java/jre1.8.0_192/jre/bin/java.exe /bin/java

To try and make a link to it.

I cannot get it to wrong. It always tells me

-bash: C:/Program Files/Java/jdk1.8.0_192/jre/bin/java: No such file or directory

When I am certain that file exists. Any ideas?


You need the linux version of the JRE or JDK installed inside your bash subsystem. I think the correct process is basically download the Linux JRE/JDK from Oracle, unpack the files and setup your environment variables pointing at your linux binaries.

Theres a nice script on SO that shows you the steps (if you use this script update the URLs to the latest version - post is from last May):

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.