• 卸载CentOS自带的JDK并配置指定JDK环境变量


    1.卸载:

      yum -y remove java 

    2.安装JDK

      1).解压JDK

      2) . vi /etc/profile  在最后添加

    JAVA_HOME=/usr/share/jdk1.5.0_05
    PATH=$JAVA_HOME/bin:$PATH
    CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    export JAVA_HOME
    export PATH
    export CLASSPATH

      3). 执行source /etc/profile

    -----------------------------------------------

    如果出现,-bash: /yyl/soft/jdk1.7/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

    执行:yum -y install mesa-libGL.i686 

    就OK了

    如果出现,-bash: export: `JAVA_HOME ': not a valid identifier

    将上面的代码粘贴到记事本里,清理空格后再粘贴到linux的/etc/profile 上就可以了。

    如果出现,-bash: /opt/jdk1.7.0_71/bin/java: cannot execute binary file

    说明JDK版本与操作系统不匹配,64为jdk在32位系统上

  • 相关阅读:
    Codeforces 1149 B
    Tenka1 Programmer Contest 2019 D
    BZOJ 1001 [BeiJing2006]狼抓兔子
    Codeforces 741 D
    HDU 5306 Gorgeous Sequence
    HDU 6521 Party
    Codeforces 912A/B
    Educational Codeforces Round 35 B/C/D
    Codeforces 902D/901B
    Codeforces 902B
  • 原文地址:https://www.cnblogs.com/baby-bear/p/3798263.html
Copyright © 2020-2023  润新知