当前位置: 首页 > 工具软件 > WSL-Programs > 使用案例 >

WSL-Ubuntu18.04安装OpenJDK 14

米元凯
2023-12-01
  • Java

    Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems, which was later acquired by the Oracle Corporation, tha provides a system for developing application software and deploying it in a cross-platform computing environment.

    Java is a class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.

  • Java virtual machine (JVM)

    A JVM is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode.

    The JVM reference implementation is developed by the OpenJDK project as open source code and includes a JIT compiler called HotSpot.

  • JavaSE

    Java Platform, Standard Edition (Java SE) is a computing platform for development and deployment of portable code for desktop and server environments.

    The platform uses Java programming language and is part of the Java software-platform family.

  • OpenJDK

    OpenJDK (Open Java Development Kit) is a free and open-source implementation of the Java Platform, Standard Edition (Java SE).

    It is the result of an effort SUn Microsystems began in 2006.

    OpenJDK is the official reference implementation of Java SE since version 7.

    The OpenJDK project produces a number of components: most importantly the virtual machine (HotSpot), the Java Class Library and the Java compiler (javac).

  • Install OpenJDK14 on WSL with Ubuntu18.04

    OpenJDK下载地址

    理解i586 vs x64

    wget https://download.java.net/java/GA/jdk15.0.1/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-15.0.1_linux-x64_bin.tar.gz 
    
    sudo mkdir /usr/java
    cd /usr/java
    sudo cp /data/openjdk-15.0.1_linux-x64_bin.tar.gz .
    sudo tar -xzvf openjdk-15.0.1_linux-x64_bin.tar.gz
    # now you have install the JDK to the path /usr/java/jdk-15.0.1
    
    sudo nano /etc/profile # 复制下述内容
    
    # OpenJDK 15.0.1
    JAVA_HOME=/usr/java/jdk-15.0.1
    PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
    export JAVA_HOME
    export PATH
    

    更多配置详情参见References1.

    最好在~/.bashrc也做上述修改。

  • References

  1. How To Install OpenJDK 14 On Ubuntu
 类似资料: