zoukankan      html  css  js  c++  java
  • 升级java8---from centos

    安装步骤:
    wget http://10.107.2.44/jdk-8u111-linux-x64.tar.gz
    root@ute-image:~# tar zxf jdk-8u111-linux-x64.tar.gz 
    root@ute-image:~# mv jdk1.8.0_111/ /usr/lib/jvm/
    root@ute-image:~# vi /etc/profile     //添加本地变量,在最后一行
    export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_111/
    export JRE_HOME=${JAVA_HOME}/jre
    export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
    export PATH=${JAVA_HOME}/bin:$PATH
    root@ute-image:~# source /etc/profile
    root@ute-image:~# update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_111/jre/bin/java 1100
    root@ute-image:~# update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_111/bin/javac 1100  
    
    root@ute-image:~# update-alternatives --config java 
    There are 2 choices for the alternative java (providing /usr/bin/java).
    
      Selection    Path                             root@ute-image:~# update-alternatives --config javac
    There are 2 choices for the alternative javac (providing /usr/bin/javac).
    
      Selection    Path                                    Priority   Status
    ------------------------------------------------------------
    * 0            /usr/lib/jvm/jdk1.8.0_111/bin/javac      1100      auto mode
      1            /usr/lib/jvm/j2sdk1.7-oracle/bin/javac   317       manual mode
      2            /usr/lib/jvm/jdk1.8.0_111/bin/javac      1100      manual mode
    
    Press enter to keep the current choice[*], or type selection number: 
              Priority   Status
    ------------------------------------------------------------
    * 0            /usr/lib/jvm/jdk1.8.0_111/jre/bin/java      1100      auto mode
      1            /usr/lib/jvm/j2sdk1.7-oracle/jre/bin/java   317       manual mode
      2            /usr/lib/jvm/jdk1.8.0_111/jre/bin/java      1100      manual mode
    
    Press enter to keep the current choice[*], or type selection number: java8      
    
  • 相关阅读:
    php 数组的结构和定义
    flink常用命令
    flink 启动job命令
    微信公众号开发前端获取openId
    git命令提交新项目
    微信公众号开发
    idea提交项目到码云上
    elasticsearch kabana中创建索引
    vue-cli项目多页面配置
    windwos安装docker步骤
  • 原文地址:https://www.cnblogs.com/ligao/p/6163257.html
Copyright © 2011-2022 走看看