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