-1

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?

New contributor
Trying is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0

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):

New contributor
MisterSmith is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Trying is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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