Javase Study Summary No. 01 Day _java Overview

Source: Internet
Author: User
Tags clear screen create directory

01.01 Computer Overview

Computer (computer): The full name of the computer, commonly known as computers.

It is a modern intelligent electronic device which can operate according to the program, automatically and high-speed processing massive data.

A computer consisting of hardware and software that does not have any software installed is called bare metal.

Common forms are desktop computers, laptops, mainframe computers, and so on.

01.02 Overview of computer hardware and software

Computer hardware (computer Hardware) refers to a computer system consisting of electronic, mechanical and optoelectronic components, such as a variety of physical devices collectively.

These physical devices constitute an organic whole to provide the material basis for the computer software operation according to the requirements of the system structure.

The computer usually consists of CPU, motherboard, memory, power supply, Host box, hard disk, video card, keyboard, mouse, monitor and other components.

Computer software is an essential thing in the process of using computer, computer software can make the computer in order to complete the specific function in advance, computer software according to its function divided into system software and application software

System software: DOS (Disk Operating system), Windows, Linux, Unix, Mac, Android, IOS

Application software: office,qq chat, yy language, minesweeper

01.03 software development and computer language overview

Software: A collection of computer data and instructions organized in a specific order

Development: The process of software production

Software development: Development tools and computer language authoring software

Computer language: A special language for information communication between man and computer

There are characters, symbols and so on in the computer language.

Common computer languages such as C,c++,c#,java

01.04 Man-Machine interaction

The advent of software enables better interaction between people and computers.

Interactive mode

Graphical interface: This method is simple and intuitive, the user is easy to accept, easy to operate.

Command-line mode: You need to have a console, enter specific instructions, and let the computer do some work. More trouble, need to record some commands.

01.05 keyboard function keys and shortcut keys

function keys

Tab: Tab position key, which is usually equal to 8 spaces per press

Shift: Press the SHIFT key, press the number key to hit the number keys above the characters, but also for the input method of the Chinese-English switch

Ctrl: Commonly used in combination with other keys, called shortcut keys

ALT: Usually used in combination with other keys

Enter: Enter the line break key

PrtSc (printscreen): Screen

Shortcut keys

CTRL + a Select all Ctrl + C copy

Ctrl + V paste ctrl+x cut

CTRL + Z undo Ctrl+s Save

01.06 How to open the DOS console

1. Start → program → accessories → command prompt

2. Start → run →cmd→ enter

3. Shortcut key win+r→cmd→ Enter

4.win7 above the system on the desktop shift-click the right mouse button → Open the command window here

01.07 Common DOS Commands explained

D: Enter: drive letter switch, which means switch to D drive

Dir (directory): Lists the files and folders in the current directory

MD (Make directory): Create directory

RD (remove directory): Delete directory

CD (change directory): Changing the specified directory (enter the specified directory)

CD: Back to top level directory

Cd\: Go back to the root directory

Del (delete): Delete file, example: Delete a bunch of suffix names like *.txt,del *.txt

Exit: Exit DOS command line

CLS (Clear screen): Clear

01.08 Extended DOS Commands

rd/s all subdirectories and files under the specified directory are deleted, in addition to the directory itself. Used to delete a directory tree.

rd/q Quiet mode, with/S does not require confirmation when deleting a directory tree

01.09 Java language Overview

History of the Java language

1.0.2

1.1.1→1.1.6→1.1.7→1.1.8

1.2.1

1.2.2

1.3.0→1.3.1

1.4.0→1.4.1→1.4.2→1.5.0 (5.0) →1.6.0 (6.0) →1.7.0 (7.0)

Java language Platform version

1.j2se (Java 2 Platform standard Edition) edition

is a solution for developing common desktop and business applications, which is the basis for a number of other desktop applications to be developed

2.j2me (Java 2 Platform micro Edition) Mini version

is a solution for developing electronic consumer products and embedded devices

3.J2EE (Java 2 Platform Enterprise Edition) Corporate Edition

is a set of solutions for developing applications in an enterprise environment, including technologies such as Servlets, JSPs, etc., primarily for web application development

Java5.0 version, renamed to Javase javame Java EE

01.10 principles of the Java language cross-platform

Cross-platform: Applications written in the Java language can be run on different system platforms.

Rationale: Simply install a Java Virtual machine (JVM Java VM) on the operating system that needs to run the Java application. The JVM is responsible for the operation of the Java program in the system.

01.11 Overview of JDK and JRE

JRE (Java Runtime Environment Java Run environment)

including Java virtual machines (JVM Java) and the core class libraries required by Java programs, if you want to run a well-developed Java program, you only need to install the JRE on your computer.

JDK (Java Development Kit Java Development Kit)

The JDK is available to Java developers, which includes Java development tools and the JRE. So installing the JDK no longer installs the JRE separately. Development tools: Compilation Tools (Javac.exe) packaging Tools (Jar.exe), etc.

In simple terms, a Java program developed using the JDK was handed over to the JRE to run

Download of the 01.12 JDK

Get JDK http://www.oracle.com from the official website

Download different JDK versions for different operating systems

Installation of the 01.13 JDK

Click Next. Recommendation: The installation path should not have Chinese or special symbols such as spaces. The best directory is unified.

When prompted to install the JRE, you can choose not to install.

Verify that the installation was successful: Enter Java or javac in the DOS window to help explain the installation success

Uninstall of 01.14 JDK

1. Start → settings → control Panel → add or Remove Programs to delete

2. Use professional tools (e.g. 360 software butler)

01.15 Java Development Tools Introduction

Development tools: Notepad (Microsoft OS comes with), notepad++, Eclipse, MyEclipse

01.16 writing and running of the first HelloWorld case

To write the steps:

1. First define a class: class name

2. Add a pair of curly braces after the class definition: {}

3. Add a main (main) method/function in the middle of the curly braces: public static void Main (String [] args) {}

4. Add a row of output statements between the braces in the Main method: System.out.println ("Hello World");

5. Save the file as the class name. java

Compile run:

1. Compiler: Javac Demo.java, when the statement finishes executing, the compiler initiates a syntax check for Demo.java, if no prompt indicates that the syntax is correct, and the Demo.class file is generated

2. Run the program: Java Demo, the statement will start after the virtual machine will be loaded into memory to run Demo.class

01.17 FAQ Summary of development

1. File name extension shadowing causes compilation to fail

2.class write wrong Class Claas ...

3. The class name format has the problem as far as possible in the English state input

4. The curly braces that follow the class name are not matched correctly

5.main method Format error public static void Main (string[] args) {}

6.main method Curly Brace missing

7. Print Statement spelling error System.out.println ("");

8. Quotation marks using errors, using Chinese full-width quotation marks

01.18 Configuring the PATH environment variable

The role of the PATH environment variable configuration

The execution of the program requires the use of external instruction Javac, but the javac instruction can only be written in the bin directory under the JDK installation directory, so the program can only write to the bin directory, but in the course of program development, the source code cannot be written to the JDK installation directory. Therefore, the source program needs to be saved to the specified directory in any location (recommended English directory), so you need to make the javac instruction run in any directory

01.19 PATH environment variable configuration mode 1

WIN7,WIN8 System: Right click on desktop computer → select Properties → select advanced system settings → select advanced tab → Click environment variables → system variables below find path→ double-click Path

XP system: Right click on desktop computer → select Properties → select advanced tab → Click environment variables → system variables below find path→ double-click Path

Add the Bin directory under the JDK installation directory to the leftmost and add a semicolon;

01.20 PATH environment variable configuration mode 2

Reference configuration for entering the PATH environment variable 1

Create a new variable name: java_home, add variable value for java_home: JDK installation directory, such as E:\JAVAJDK\Java\jdk1.6.0_45

Modifying the JDK directory in the PATH environment variable to%java_home%\bin,%java_home% on either side indicates that Java_home is a variable

PATH environment variable has precedence

Use the javac-version command to view the version of the currently used JDK when multiple JDK is installed in the system

The function and configuration of 01.21 Classpath

Role: Enables. class files in the Classpath directory to run in any directory

Configuration: Create a new variable name: Classpath, the value is set to the specified directory containing the class file, using semicolons between multiple directories (;) split

1. If the classpath path is not set, the virtual opportunity finds the. class file in the current directory, and the error is not found

2. If the classpath path is set, the virtual opportunity looks for the. class file in the set directory, and the error is not found.

Example: Set Classpath=c:\myclass, the virtual opportunity to find the. class file under the C:\myclass directory

3. If the classpath path is added after the set, the virtual opportunity locates the. class file under the directory set, if no virtual opportunity is found in the current directory to find the. class file, if not found then the error

4. Set multiple classpath paths, example: Set classpath=.; C:\myclass. Indicates the current path

5. Add a new classpath path on the original basis, for example: Set classpath=.; %classpath%

Note: If the above settings are set in a DOS window, the settings are temporary and the DOS window shutdown setting disappears.

Permanent setting If the above settings are set under the Environment Variables window

The difference between 01.22 path and classpath

The PATH environment variable is an executable file, such as an. exe file, where the executable file is located in the current path, and if it is not found, go to the path configured in the PATH environment variable to find

The directory where the Java class's running files are recorded in the CLASSPATH environment variable

Javase Study Summary No. 01 Day _java Overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.