How do get rid of “set ”JAVA_HOME_CONDA_BACKUP=“ ”

2019-06-16 10:42发布

问题:

Every time I start my command prompt on windows and then activate my conda environment I get two messages:

C:\Users\texas_cactus>set "JAVA_HOME_CONDA_BACKUP="

and

C:\Users\texas_cactus>set "JAVA_HOME=C:\Users\texas_cactus\AppData\Local\Continuum\anaconda3\envs\tc35\Library"

Where are these messages coming from and how can I get rid of them? Google is not my friend here.

回答1:

I created an environment with openjdk

when I activated the env I had the same echo as you (except with my path)

in anaconda3\envs\tc35 look for etc\conda\activate.d

in mine, i found java_home.bat with the contents

set "JAVA_HOME_CONDA_BACKUP=%JAVA_HOME%" 
set "JAVA_HOME=%CONDA_PREFIX%\Library"

deleting java_home.bat stopped the echo when activating my env, but i'm not certain the package will work correctly after.

you can probably safely comment out set "JAVA_HOME_CONDA_BACKUP=%JAVA_HOME%" since it's not set anyway



回答2:

Depending on which version of Windows used by you such statements can also be found in autoexec.bat or autoexec.nt