Installing Java 7 on Ubuntu

后端 未结 10 1403
温柔的废话
温柔的废话 2020-11-29 14:12

to install java I have always used the classic way from the terminal. I would like to install java manually. I placed the folder of the JDK on the desk and I set environment

10条回答
  •  误落风尘
    2020-11-29 15:14

    Open Applicaction -> Accessories -> Terminal
    
    Type commandline as below...
    
    sudo apt-get install openjdk-7-jdk
    
    Type commandline as below...
    
    apt-cache search jdk
    
    (Note: openjdk-7-jdk is symbolically used here. You can choose the JDK version as per your requirement.)
    
    For "JAVA_HOME" (Environment Variable) type command as shown below, in "Terminal" using your installation path...
    
    export JAVA_HOME=/usr/lib/jvm/java-7-openjdk
    
    (Note: "/usr/lib/jvm/java-7-openjdk" is symbolically used here just for demostration. You should use your path as per your installation.)
    
    For "PATH" (Environment Variable) type command as shown below, in "Terminal" using your installation path...
    
    export PATH=$PATH:/usr/lib/jvm/java-7-openjdk/bin
    
    (Note: "/usr/lib/jvm/java-7-openjdk" is symbolically used here just for demostration. You should use your path as per your installation.)
    
    Check for "open jdk" installation, just type command in "Terminal" as shown below
    
    javac -version
    

提交回复
热议问题