Recognition of DOS commands and setting of environment variables
When you uninstall a certain software, some people who are too smart will delete the registry manually, so that you can indeed Completely remove software residues to a certain extent. However, people who have studied computers sometimes find that when entering a command such as ipconfig in a DOS window, it will prompt "'xxx' is not an internal or external command, nor is it an operable program or batch file." Of course, most people You won't notice this. But when you press the Window and R keys at the same time to enter the console and enter commands such as help or ipconfig, you will find that a DOS window displays some information and flashes by. This means that these programs are still on your computer. It shows that the program is still there, but the command entered in the DOS window cannot be recognized. The reason is very simple. The system cannot find the path, that is, the environment variable path. Of course, people who often use these software will be troubled, but if you search on Baidu, you will find a lot of solutions
1. Be able to explain the difference between JDK and JRE
JDK (Java Development Kit ) is a JAVA development tool kit (javac.exe;java.exe) provided to developers, including JRE (Java Runtime Environment).
JRE (Java Runtime Environment) is a Java program running environment, including JVM (Java Virtual Machine) and core class libraries.
The summary is: Programs developed by developers using JDK run in JRE.
2. You can use common DOS commands
d: -- Return to the root directory of drive d;
cd.. -- Return to the upper directory (take C drive as an example);
cd "file name" -- open the folder;
dir -- view the current folder;
cls -- clear the screen;
exit -- exit;
3. Able to write HelloWorld source files
public class HelloWorld{ public static void main(String[] args){ System.out.println("HelloWorld!"); } }
4. Able to compile HelloWorld.java
dos and enter the source file (.java) folder to be compiled--in the dos window, enter the javac.exe path .java file--enter--generate .class file
&
5. Able to run HelloWorld.class file
dos enter the folder where the .class file needs to be run--enter java in the dos window. exe path&.class file--enter--window output
6. Ability to configure path environment variables independently
Environment variable configuration needs to be modified in two places:
a. System--Advanced System Settings--Environment Variables--System Variables--New--Name (JAVA_HOME), Variable Value (D:\JAVA);
b. System--Advanced System Settings--Environment Variables--System Variables-- Find "PATH" - add "%JAVA_HOME%\bin;..." at the beginning
7. You can use comments in source code
Comments in java are divided into three categories:
a .Single-line comment&//
b.Multi-line comment&/*&*/
c.Documentation comment&/**&*/
8. Be able to explain the concept of keywords
Keywords are words given special meaning by JAVA. They are characterized by being all lowercase and marked with colors in specific software.
9. Be able to understand the concept and classification of constants
Constants are divided into 6 categories:
a.Integer
b.Decimal
c.Character
d.String
e.Boolean type
f.Null value
10. Be able to repeat the concept of variables
Variables are divided into two categories: basic variables, reference variables
Reference variables such as arrays, interfaces, etc.
Basic variables are divided into 4 categories and 8 types
a. Integer type
&1)byte 1 byte
&2)short 2 bytes
&3)int( Default) 4 bytes
&4)long 8 bytes
b.Floating point type
&1)float 4 bytes
&2)double(default) 8 bytes
c. Boolean type: boolean--true/false 1 byte, the default value is false.
d. Character type: char 2 bytes
11. Be able to remember the definition format of variables
Two definition methods:
a. int b;
&b = 130;
b. int b = 130;
Note: The data range of each variable type; variables must be initialized before they can be used;
12. Be able to use identifiers to define variables and class names &
Identifiers refer to naming conventions. There are the following points:
a. Letters/numbers/$/_ can be used for naming;
b. Numbers and _ cannot begin;
c. When naming packages, the first letter of each word must be lowercase;
d. Class naming, the first letter of each word is capitalized (high camel case nomenclature);
e. Variable naming, the first letter of the first word is lowercase, and the first letter of each subsequent word is capitalized (lower camel case nomenclature) );
f. Method naming, the first letter of the first word is lowercase, and the first letter of each subsequent word is uppercase (small camel case nomenclature);
13. Decompile
javap
The above is the detailed content of Examples of identification of dos commands and setting of environment variables. For more information, please follow other related articles on the PHP Chinese website!