-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jenv add not a valid path to java installation #139
Comments
can you
|
Do you have |
Hi guys. Same as the above, I installed java10 through brew cask install java
I located the different installation directory for java: I cannot add either of the locations where the java executable is located to jenv. |
I fixed it by: but now jenv versions does not provide what I want and I must: |
or just do this: |
I was getting this error and got passed it by creating the .jenv folder in ~ after that worked like a charm |
Had same issue but was able to fix it by restarting terminal. As shown: Restart your shell by closing and reopening your terminal window or running exec $SHELL -l in the current session for the changes to take effect. To verify jenv was installed, run jenv doctor. On a macOS machine, you'll observe the following output:
|
similar issue at zsh shell: ls /Library/Java/JavaVirtualMachines
adoptopenjdk-8.jdk
jdk-14.0.2.jdk
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
ln: /usr/local/opt/jenv/versions/openjdk64-1.8.0.265: No such file or directory
jenv doctor
[OK] No JAVA_HOME set
[ERROR] Java binary in path is not in the jenv shims.
[ERROR] Please check your path, or try using /path/to/java/home is not a valid path to java installation.
PATH : /usr/local/Cellar/jenv/0.5.4/libexec/libexec:/Users/webia1/.jenv/shims:/Users/webia1/.nvm/versions/node/v8.17.0/bin:/Users/webia1/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
[OK] Jenv is correctly loaded
The following configuration ( eval export PATH="/Users/__YOUR_USER_NAME__/.jenv/shims:${PATH}"
export JENV_SHELL=zsh
export JENV_LOADED=1
unset JAVA_HOME
source '/usr/local/Cellar/jenv/0.5.4/libexec/libexec/../completions/jenv.zsh'
jenv rehash 2>/dev/null
jenv refresh-plugins
jenv() {
typeset command
command="$1"
if [ "$#" -gt 0 ]; then
shift
fi
case "$command" in
enable-plugin|rehash|shell|shell-options)
eval `jenv "sh-$command" "$@"`;;
*)
command jenv "$command" "$@";;
esac
} |
run this command to make zsh load zsh shims first.
|
thanks very much |
I have installed java7 through brew cask install java7
then run the command
jenv add /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/
I have also installed java8 through brew cask install java
then run the command
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/
the error is like this one
/System/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home is not a valid path to java installation
The text was updated successfully, but these errors were encountered: