Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2795

Can I create a symlink to a Windows executable in the Windows Subsystem for Linux (WSL) PATH?

$
0
0

I have Android Studio and JDK 8 installed on Windows, but the JDK cli isn't available on my WSL. When I type java or javac, the command isn't found. I followed the suggestion here and now I can reach the commands from WSL by typing java.exe and javac.exe, but I don't want to have to specify the .exe extension. My idea is to add a symlink that points to the executables, but without having to specify the path to the executable (/mnt/c/...) seeing as that's already been done in the WSL PATH. So can I create a symlink that points to a location in the PATH? If this doesn't make sense, this is what I tried:

sudo ln -s -t java.exe java

and I got "failed to access 'java.exe': No such file or directory". Yet this is exactly what I want to achieve: a symlink to an executable in the PATH without specifying the actual path to the executable because PATH already has that. If I'm crazy and this is silly/impossible/unnecessary, you can say that as the answer and I'll accept it! :-D


Viewing all articles
Browse latest Browse all 2795

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>