Sharing PATH Variable Windows Subsystem for Linux (WSL) [on hold]
Sharing PATH Variable Windows Subsystem for Linux (WSL) [on hold]
So I am trying to link the PATH variables for Java (and Python) to the Windows Linux bash shell
I've tried following the directions on here: https://blogs.msdn.microsoft.com/commandline/2017/12/22/share-environment-vars-between-wsl-and-windows/
for /p
with the path that I already have on windows: C:Program Files (x86)Common FilesOracleJavajavapath
C:Program Files (x86)Common FilesOracleJavajavapath
I did everything the same except first define TRANSLATABLEPATH as my the linux mnt path and then when im in cmd, the windows path
What am I doing wrong?
Edit: See comment but I basically set TRANSLATABLEPATH and export WSLENV=TRANSLATABLEPATH/p
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
thanks for the feedback, but i thought it was clear that I made the value of the translatablepath variable C:Program Files (x86)Common FilesOracleJavajavapath. the problem is obviously that the path isn't registered, in terms of error theres not really an error (this is bash we're talking about). the goal is to enter java into ubuntu
– gdev
Jun 29 at 17:58
a guess- should i define translatablepath as a env variable?
– gdev
Jun 29 at 17:59
Sadly what we think is clear or obvious often isn't :-) For example, I had read (misread) except first define TRANSLATABLEPATH as meaning you did not define TRANSLATABLEPATH. My mistake, but you see how confusion arises? I would urge you to re-write your question as if you were talking to an idiot (feel free to consider me the idiot). Instead of saying I basically set TRANSLATABLEPATH show your readers the actual
set
command along with the set
command for WSLENV. Likewise show the output of echo
or some other command that makes obvious that WSLENV hasn't done what you want.– Frank Boyne
Jun 29 at 18:43
set
set
echo
OK so now WSLENV is both
/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath/p
from cmd and bash, i think the problem is the /p is taken literally instead of being the translation it was meant to be. It also comes up as a PATH variable in bash (which seems to be my windows system variables) but I don't see why WSLENV is necessary if this is already done. in any case a simple call of java in bash still doesn't work– gdev
Jun 29 at 18:54
/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath/p
Hello and welcome to StackOverflow. You've told your readers about the instructions you are following and about the path you want to share but you haven't shown the WSLENV value you are using or the values of the environment variables mentioned in your WSLENV. Nor have you told them what the actual problem is. Without that information it will be difficult for someone to say what you are doing wrong. See tour and How to Ask for more hints on asking effective questions.
– Frank Boyne
Jun 29 at 17:44