• ubuntu 10.04安装sunjava5jdk


    在终端输入apt-get install sun-java5-jdk时提示找不到源,需要修改源文件
     
    1、修改ubuntu的软件源
    #vim /etc/apt/sources.list
     
    在最后一行中加入
    deb http://cz.archive.Ubuntu.com/ubuntu hardy-updates main multiverse

    2、更新源文件
    #apt-get update
     
    3、安装sun-java5-jdk
    #apt-get install sun-java5-jdk
     
    4、设置环境
    #vim /etc/profile
     
    在文件/etc/profile中加入
    JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun                                      
    export  CLASSPATH=.:$JAVA_HOME/lib:$CLASSPATH                              
    export  PATH=$JAVA_HOME/bin:$PATH
     
    5、安装编译环境需要的安装包
    #apt-get install bison build-essential zlib1g-dev flex libncurses-dev libx11-dev gperf
     
    6、设置系统默认版本为1.5
    #update-java-alternatives -s java-1.5.0-sun
     
    7、查询JAVA的版本:
    #java -v
     
    8、修改dash为bash功能
    #ln -snf /bin/bash /bin/sh

  • 相关阅读:
    Number Clicker CodeForces
    We Need More Bosses CodeForces
    Tree Constructing CodeForces
    Berland and the Shortest Paths CodeForces
    Allowed Letters CodeForces
    Military Problem CodeForces
    FFT自看
    Communication System
    Dollars
    Coin Change
  • 原文地址:https://www.cnblogs.com/leino11121/p/2381926.html
Copyright © 2020-2023  润新知