This is the sixth day of my participation in the August More text Challenge. For details, see: August More Text Challenge

Entrusted to maintain a project based on the Ruoyi project with Java technology stack

Reference tutorial: bilibili.com

1. Computer structure

Computers include:

hardware

  • CPU: Central processing unit (CPU), responsible for the core operations of a computer. It is the most central component of a computer, commander. 1 plus 1 is 2
  • Memory: Temporary storage area where data is stored while a program is running.
  • Motherboard: connect the components
  • The graphics card
  • sound card
  • The mouse
  • The keyboard
  • Hard disk [external storage] : permanent storage, power off and then start, data still exist.
  • .

software

  • The system software
    • The Windows of the series
      • winxp
      • win7
      • .
    • Linux serial
      • Red Hat
      • Fedora
      • SUN Solaris
      • .
    • Application software
      • QQ
      • Baidu Cloud Manager
      • Office Software
      • .

Summary: Application software runs in the system software, which interacts with the underlying hard disk.

2. The role

The Java programming language can: complete application software development.Copy the code

3. Install a text editor more powerful than Notepad:

You can choose

  • Sublim
  • EditPlus
  • UtralEdit
  • .

4. Install the software EditPlus:

Note:

  • Which directory is installed in
  • Do not install additional plug-ins
  • The installation path should not contain Chinese characters
  • .

5. Set the file name extension

The Windows operating system does not display file extensions by default. You must display the file extensions as a programmer:

Computer --> Organization --> Folders and search options --> View --> hide extensions for known file typesCopy the code

6. Settings for the EditPlus tool:

In Windows, the. TXT file is opened with the EditPlus tool: Set the default opening program for the file. Remove the default backup Settings for the EditPlus toolCopy the code

7. DOS commands commonly used in Windows operating system:

* Do not use the UI, using the DOS command to complete all the operations. * Where do I execute DOS commands? * How to open the DOS command window? - Shortcut key: win + r, open the running window - Enter CMD and press Enter * To view IP address: -ipconfig -ipconfig /all To view more detailed IP information. In this way, you can view the physical address of the NETWORK adapter. Physical addresses are globally unique. Is the number embedded in the production of the network card. * Clear screen: CLS * DOS window can also set the font and screen and text color. How to copy text from the DOS command window: Right click anywhere -> mark -> select the text you want to copy -> right click (now in the clipboard) find a position to paste. * Check whether the communication between the two computers can be normal: -ping 192.168.27.23 [Sends and receives data packets for 4 times] -ping 192.168.27.23 -t [sends and receives data packets continuously] -ping www.baidu.com Log in to Baidu: http://119.75.218.70 * Forcibly terminate the running program in the DOS command window: CTRL + c * Open the DOS command window default path is: c :\Users\Administrator\?? * create directory: Mkdir ABC [to create a new directory in the current directory, name it ABC] * About directory switching command: cd-cd Syntax of the command: CD path - Paths are classified into: - Absolute paths: C:\Users\Administrator D:\ user directory \ favorites F:\tools\ camtasiastudio-v6.00...... Start from the root path of the hard disk. - Relative path: Indicates the path starting from the current location. - Auto completion: CD e [Then press TAB to complete all directories starting with e in the current directory. If the auto-completion path is not the desired path, you can continue to use TAB] - Return to the parent directory: CD.. [.. is a path that represents the upper path of the current path] CD.. /.. /.. / - Go directly to the root path: CD \ * View all the subfiles and subdirectories under the current directory: dir * Do not put the relevant important data on the desktop, because the desktop is a system disk C. * How to switch drive letters: [do not need to use the CD command] C: Enter D: Enter E: Enter f: Enter * Open registry: regeditCopy the code

8. Shortcuts

Windows shortcuts: * Win + R opens a running window * Win + D displays the desktop * Win + e opens Explorer * Win + L Lock screen * Alt + TAB switches between applications

9. Text editor shortcuts

“Universal” text editing shortcuts: * CTRL + A select all * CTRL + C Copy * CTRL + V Paste * CTRL + S Save * CTRL + x Cut * CTRL + Z Undo * CTRL + Y Redo * TAB indent/multi-line indent * Shift + TAB Unindent * HOME goes back to the beginning of the line * END goes back to the END of the line * Shift + HOME Selects a line * Shift + END Selects a line * CTRL + Shift + Right or left arrow selects a word * Double click: Select a word * three mouse clicks: Select a line * CTRL + end goes back to the end of the file * CTRL + Home goes back to the header

10. What is JDK?

Java Development Kits are available for download from the Oracle website. http://www.oracle.com * Current 2016-08-30 highest version Java8 [Java SE 8u101/8u102] * When downloading the JDK, note the following: The JDK version varies with the operating system.Copy the code

11.Java in three big chunks: 1999

* J2SE [Standard version of Java] : Basic, whether it is going to EE or ME, SE is a must to master. J2SE is SUN company for Java programmers to prepare a set of "basic class library", after this set of basic class library learning, you can complete the most basic operation, for example, file read and write, thread control.... * J2EE [Java enterprise version] : This is SUN company specially prepared for programmers a set of "class library", this class library can assist programmers to complete the development of enterprise software enterprise software: OA office system, invoir-storage system, supermarket system....... * J2ME [Java Micro version] This is another set of "libraries" specially prepared by SUN For Java programmers. This set of libraries can assist programmers to complete the embedded development of micro devices, which is what Java was originally designed for.Copy the code

In 2005, the 10th anniversary of Java, these three modules were renamed:

* JavaSE
* JavaEE
* JavaME
Copy the code

13. Key terms:

* JDK [Java Development Kit] * JRE [Java Runtime Environment] * JVM [Java Virtual Machine] The relationship between the JDK contains the JRE, JRE contains the JVM.Copy the code

14.Java Language Features:

* Cross-platform/portable - There is a special mechanism: JVMS - Java programs do not interact directly with the underlying operating system, Java programs actually run in the JVM, and the JVM masks the differences between the operating systems. - But there is a prerequisite: different versions of the JVM must be installed on different operating systems. - Very good in terms of portability, compile once, run everywhere. - However, in order to be portable, the JRE must be installed in the operating system in advance, and the JVM will not come until the JRE is available. [The JVM cannot be installed separately] The experience is not particularly good. * Java claims to be open source, free, cross-platform, and purely object-oriented. - Open source: Develop the source code for the Java class libraries written by SUN that ordinary programmers can see. Everyone adds wood to the fire. The Java program will be robust. Few bugs - Free - Cross-platform: Dependent on the JVM [Java programs don't interact with the operating system, Java programs run in the JVM, and the JVM interacts with the operating system] Different operating systems have different versions of the JVM. - Object oriented: When human beings recognize the real world, most of them recognize it in the way of object oriented. * Simplicity: * Simplicity here is in relation to C. * For example: C language has pointer, C++ multiple inheritance * Java cancles the concept of pointer, cancles multiple inheritance, only supports single inheritance. . Java also has a special mechanism: automatic garbage collection. The GC mechanism. There is a "garbage collector" that is always guarded during Java running. .Copy the code

15.Java loading and execution: a complete Java program

The entire Life cycle of Java development consists of two important phases, namely, the compile phase and the run phase. The files generated by compilation are: xxx.class file * Compilation and running can be done in different operating systems. * Programmers write source code in xxx. Java files. The source code must conform to Java syntax. These sources are called high-level languages. The file where the source code is stored is called the source file. * Procedure: compile time: [done in Windows] - install JDK, configure environment - create an xxx. Java source file somewhere on the hard disk - open the source file, write the source program that complies with Java syntax in the file, and save it. - Compile the above Java source programs using the javac.exe command delivered with the JDK. * Compile pass: indicates that the syntax is fine - generates one or more bytecode files on hard disk [xxx.class] * Compile fail: indicates that the source program does not conform to the Java syntax format somewhere. * Compile syntax format: open a DOS command window and type: Javac source file path Note: - Source file path can be absolute or relative. - After compilation, Java source file deletion does not affect program execution. - It is best not to delete the Java source files, because when the program does not run as expected, you need to modify the Java source code again, and then recompile it to generate a new class bytecode file, and then re-run the bytecode program. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- runtime: - Open a command window and run the Java program using the java.exe command in the command window, syntax format: Java class name Note: When the Java command is used, the Java command does not follow the path of the file. Must be a "class name". For example: Java Hello Java Student Java User Java Product - JVM * After the JVM is started, the "classloader-class Loader" is started immediately. * The ClassLoader is responsible for searching the "classname.class" bytecode file in a "location" on the hard disk. * If the.class file cannot be found, an exception must occur. * After finding the.class file, convert the.class file to "binary". The operating system can recognize the binary directly, and the operating system executes the binary code to interact with the underlying hardware platform.Copy the code

16. What is a class name?

* If there is a file on the hard disk called hello.class, then the class name will be: Hello * If there is a file on the hard disk called student.class, then the class name will be: Student * If there is a file on the hard disk called user.class, then the class name will be: Hello * If there is a file on the hard disk called student.class, then the class name will be: Student * If there is a file on the hard disk called user.class, then the class name will be: User * Suppose you have a file on your hard disk called product. class. The class name is Product....Copy the code

17. Start development of your first Java program

* Create a new Java source file on your hard disk: * Open the command window and compile with the javac command: Javac source file path error: C:\Users\Administrator>javac 'javac' is not an internal or external command, nor a runnable program or batch file. How to solve it? The first solution is to switch to the directory where the javac.exe file is located. At this time, using javac.exe will not cause problems, but this way is troublesome. The second solution is to configure the environment variable path. Principle: How does the Windows operating system search for a command? * If the command does not exist in the current directory, it will look for the command in the path specified by the environment variable. * If it is still not found, an error message is displayed. - path The environment variable belongs to the Windows operating system and has nothing to do with Java. The environment variable is used to specify the search path of the command. How to configure environment variables? Computer -> Right click -> Properties -> Advanced System Settings -> Environment Variables Environment variable configuration includes user level and system level Any environment variable has a variable name and a variable value, such as PATH environment variable: The variable name is :path value: Path =C:\Program Files (x86)\Java\jdk1.7.0_75\bin; otherpath; otherpath..... * Run: - You must switch to the "D:\course\JavaProjects\ 02-javase \day01" directory - Run: java HelloWorld - D:\course\JavaProjects\02-JavaSE\day01>java HelloWorld Hello World!Copy the code