manjaro(archlinux)切换java版本

manjaro(archlinux)切换java版本

  • 切换工具archlinux-java

    archlinux-java help
    
    archlinux-java <COMMAND>
    
    COMMAND:
            status          List installed Java environments and enabled one
            get             Return the short name of the Java environment set as default
            set <JAVA_ENV>  Force <JAVA_ENV> as default
            unset           Unset current default Java environment
            fix             Fix an invalid/broken default Java environment configuration
    
  • 查看已经安装的java

    archlinux-java status
    
    Available Java environments:
    java-11-openjdk
    java-13-openjdk (default)
    
  • 切换java版本
    sudo archlinux-java set java-11-openjdk
    
  • 确认java版本

    java -version
    
    openjdk version "11.0.6" 2020-01-14
    OpenJDK Runtime Environment (build 11.0.6+10)
    OpenJDK 64-Bit Server VM (build 11.0.6+10, mixed mode)
    

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 wind.kaisa@gmail.com

💰

×

Help us with donation