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.
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.
It's possible to comment out set "JAVA_HOME_CONDA_BACKUP=%JAVA_HOME%"
. See conda-forge/openjdk-feedstock to verify this doesn't lead to any adverse results.
Alternatively, as mentioned in a comment by John Bollinger, prefix the set
commands with an @
(e.g. @set "JAVA_HOME_CONDA_BACKUP=%JAVA_HOME%"
), or by prefixing the whole file with @echo off
. The @
suppresses echoing on a command-by-command basis, whereas @echo off
disables echoing altogether.
echo
I also had trouble with the issue this afternoon, and it led me cannot launch my Spyder in Anaconda.
Subsequently I found the problem happened because I install the RStudio which also install the package named "openjdk" simultaneously.
"openjdk" cause the launch conflict between Spyder and RStudio.
So, if you want to get rid of the bother from the message of "set JAVA_HOME= ", you can do the following step in your environment.
C:\Users\user>conda uninstall openjdk
Notably, if you execute the step may cause your RStudio unable to be launched.
Hope this useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With