英文:
How to downgrade Java -version in Mac
问题
tried the below commands in Mac Terminal and did not update the java version:
/usr/libexec/java_home -V
export JAVA_HOME=“System/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home”
Updated again
Fixed it ! export JAVA_HOME=/usr/libexec/java_home -v 11.0.8
worked
note:
- please use ` and not ' in your terminal command.
- also only: /usr/libexec/java_home takes effect and not the System/Library/Java/JavaVirtualMachines/.
Verified version afterwards using:
Java -version
validated and all good now.
Downgraded! Yay!
英文:
tried the below commands in Mac Terminal and did not update the java version:
/usr/libexec/java_home -V
export JAVA_HOME=“System/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home”
Updated again
Fixed it ! export JAVA_HOME=`/usr/libexec/java_home -v 11.0.8` worked
note:
- please use ` and not ' in your terminal command.
- also only: /usr/libexec/java_home takes effect and not the System/Library/Java/JavaVirtualMachines/.
Verified version afterwards using:
Java -version
validated and all good now.
Downgraded! Yay!
答案1
得分: 1
欢迎来到 Stack Overflow!
尽管您已经解决了这个问题,如果您想在不同版本之间进行频繁切换,使用 sdkman 可以极大地减轻压力。
英文:
Welcome to SO!
Even though you already solved it, using sdkman greatly reduces stress if you want to switch regularly between versions.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论