Using Java on Linux

Disclaimer: The materials used in this column are written by VIP students of Kaige Academy. Students have the right to remain anonymous and have the right to final interpretation of the article. Kaige Academy aims to promote VIP students to learn from each other based on public notes.

The difference between the operation of Linux and Windows

The operation of Windows is first through the graphical interface and then through the background to generate commands to the operating system
. Linux is to directly operate the commands to the operating system
. The structure of Windows is >> drive letter >> clip

image

The structure of Linux is >> clip

image

Download and installation of Linux

1. First install the VM program from

image

Then download the image file of centOS7 on the Internet
2. Create a new virtual machine in vm and configure the configuration of the virtual machine

image

image

image

image

image

image

image

Directory Structure of CentOS Linux

image

Linux commands

image

Linux JDK download and installation

1. Obtain the download path of JDK on the official website of Oracle Corporation
2. Download from the wget command of Linux

image

3. Unzip the file by tar -zvx-f filename

JDK environment configuration

image

Writing Java code in Linux

image

image

Java syntax rules

1. The grammatical structure of Java is the same as C\C++ 2. Java is case-
sensitive
3. Parentheses appear in pairs
4. Each code must end with a semicolon
5. A Java file can contain multiple classes but only There is a class decorated with public and must be the same as the Java file name. The compiled file is named after the text after your class

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326924280&siteId=291194637