linux设置默认jdk的方法

JAVA_HOME=/usr/lib/jvm/default-jdk

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/default-jdk/bin/java 300

sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/default-jdk/bin/javac 300

posted @ 2020-10-23 13:49  蒙子  阅读(475)  评论(0编辑  收藏  举报