“This is the 15th day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021.”


Related articles

Java with Notes: Java with Notes


preface

  • I don’t know what system you use in the company for development?
  • Ubuntu is a Linux operating system based on desktop applications. Its name comes from the word “Ubuntu” in The Zulu or Hausa languages of Southern Africa, which means “humanity” and “I exist because everyone exists”. It is a traditional African value. Ubuntu is based on the Debian distribution and the Gnome desktop environment, and since version 11.04, the Ubuntu distribution has dropped the Gnome desktop environment in favor of Unity. People used to think Linux was hard to install and hard to use, but that’s all gone with Ubuntu. Ubuntu also has a huge community that users can easily tap for help. [1] since Ubuntu 18.04 LTS, Ubuntu distributions have returned to the GNOME3 desktop environment.
  • The actual use of quite a long time, personal feeling or very easy to use! We strongly recommend that you can play on your virtual machine!
  • The following installation tutorial is based onUbuntu16.04Version.

The installation

  • 1. Download the JDK installation package

    • Download address: www.oracle.com/technetwork…
  • The following information is displayed: It is best to download the.tar.gz version

  • 2. In Ubuntu, we usually create a soft folder under the opt folder and install all environments in this folder. The command is as follows:

    • 1) Switch to the opt directory:
    cd /opt
    Copy the code
    • 2) Create soft folder:
    mkdir soft
    Copy the code
    • 3) Switch to the soft folder directory:
     cd soft
    Copy the code
  • 4) Create JDK folder:

     mkdir jdk
    Copy the code
  • 3. Go to the directory where the JDK file is downloaded and run the following command:

    • 1) Decompress the JDK package
     tar -zxvf jdk-8u201-linux-x64.tar.gz
    Copy the code

    -2) Move the decompressed installation package to the opt/soft/ JDK folder

     mv ~/jdk18.. 0 _201/opt/soft/jdk
    Copy the code
  • 4. Run the following command to configure Java environment variables:

    • 1) I configured the Java environment variables in etc/profile, that is, I configured the JDK environment for all users.
    • 2) Run the following command to open the /etc/profile file:
     vim /etc/profile
    Copy the code

3) Press I to add:

#dyj set export JAVA_HOME=/opt/soft/ JDK /jdk1.8.0_201 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATHCopy the code

The following information is displayed:

  • 5. Run the following command to make the modification take effect immediately:

     source /etc/profile
    Copy the code
  • 6. Check whether the installation is successful by entering:

     java -version
    Copy the code
  • If the version number is displayed, the installation is successful, as shown below:


The road ahead is long, I see no end, I will search high and low

If you think I bloggers write well! Writing is not easy, please like, follow, comment and give encouragement to the blogger ~ Hahah