What is software

Software is a program that combines data and instructions in a specific order to complete corresponding functions.

There are two kinds of software:

System software: A platform designed to run other programs. For example: Linux, Windows, MAC, etc

Application software: the program that completes the corresponding function. For example: MS-Office, QQ, wechat and so on,

2. What is development

Development is the process of making software. Since development is a process, the process can be divided into the following steps:

Requirements analysis and research, requirements design, coding, testing, post-maintenance.

3. What software development

Software development is the whole process, from the beginning of talking to customers about requirements, writing requirements documents, designing as documents, coding by programmers, and testing projects. In this process, the division of labor and cooperation to complete each stage of the task.

 

 

Learning software development, software production, in fact, some of our ideas and requirements through software to the computer to execute. So how do we put our ideas and demands into the hands of a computer? We need to figure out how to talk to a computer.

 

[Objective: Human-computer Interaction]

If we want to talk to a computer, we need to know how to talk to a computer.

There are two ways to interact with a computer:

1. Graphical UserInterface GUI: this method is simple and intuitive, easy for users to accept and operate

2, Command LineInterface CLI: there needs to be a console, input specific instructions, let the computer to complete some operations. It’s cumbersome and requires recording some commands.

 

[Learning Effect]

Identify two ways of human-computer interaction.

【 句 型 操 练 】

If you want to communicate with the computer, the common way is to operate the graphical interface through the mouse and keyboard. It’s easy to learn and everyone can do it. But for the next dozen days, we focused on the second command line.

 

Through the command line and the computer can carry on the corresponding communication, that is to say, as long as we input the command can complete the purpose of communication with the computer. So what are the commands?

Here are some common DOS commands:

 

Dir: lists the files and folders in the current directory

Md: Creates a directory

Rd: Delete a directory

CD: Go to the specified directory

cd.. : Returns to the previous directory

CD \: Return to the root directory

Del: deletes a file

Exit: Exit the DOS command line

Help: indicates the help command

CLS: Clear screen can be used in DOS window

 

Early operation of the computer commonly used DOS commands, because need to remember a lot of commands, is not conducive to popularity, later developed into a graphical interface, through the mouse click interface to complete the operation of the computer, in fact, the internal operation of these commands.

 

【 句 型 操 练 】

After mastering the basic common DOS commands, I found that these commands are not easy to remember, so I used the graphical interface to replace these commands, so how does the graphical interface encapsulate these commands? To understand how a GRAPHICAL interface encapsulates these commands, you need to know what a graphical interface is made of.

 

What is a computer language?

Through the previous simple learning, to understand the graphical interface is the DOS command encapsulated in the inside, but this graphical interface is how to? In fact, these graphical interfaces are written by the corresponding computer language. What is a computer language?

What is a computer language

First of all, make clear what language is. Language is a way of communication between people. For example, Chinese people communicate with Chinese people in Chinese. In order for Chinese to communicate with Koreans, they need to learn Korean.

Computer language: The way people communicate with computers. If people want to communicate with computers, they need to learn computer language. There are many computer languages, such as C, C++, Java and so on. Here, we choose one of them: the Java language.

2. Introduction to Java language development

The Java language was born in SUN(StanfordUniversity Network) in the United States on March 23, 1995. The birth of Java marked the beginning of the Internet era. So far it has gone through 7 versions of development. Later, we will use version 7.0.

Oracle, the us data software giant, announced its acquisition of Sun for $7.4 billion at 19:40 on April 20, 2009.

[Learning Effect]

Know what a computer language is. Simple text overview.

【 句 型 操 练 】

Through the previous study, the basic understanding of Java is a computer language. What does this language do, and what jobs can we do when we learn it? Take your time as we learn the features and applications of the Java language.

 

I am a technical, if you want to learn or exchange, add group: 451834594. I will update the learning materials free of charge at any time.

★★★ ★★★ ★★★ ★★

Java has dominated the rankings for more than a decade. It is a wise decision to learn Java!

The Java language is divided into three technical architectures:

 

 

J2EE(Java 2 Platform Enterprise Edition) Enterprise Edition
Helps develop and deploy portable, robust, scalable, and secure server-side Java applications. Java EE is built on Java SE and provides Web services, component models, management and communication apis that can be used to implement enterprise-level Service-oriented Architecture (SOA) and Web 2.0 applications.
J2SEJava 2 Platform Standard Edition
It enables the development and deployment of Java applications for use in desktop, server, embedded, and real-time environments, providing a foundation for Java EE development. Take the Java version of Minesweeper.
J2ME(Java 2 Platform Micro Edition) Small Edition
For developing mobile and embedded devices (such as cell phones, PDAs, TV set-top boxes, and printers). Android will gradually take J2ME’s market share as it is used less and less now.
Changed to Java5.0JAVAEE    JAVASE    JAVAME

 

 

[Learning Effect]

Understand the Java three technical architecture, make clear that the technology I learned belongs to that architecture, and engage in that aspect of development in the future.

 

【 句 型 操 练 】

Knowing the technical architecture of Java now requires us to understand some of the features of Java itself, starting with Java’s cross-platform.

 

 

★★★★★ ★★★★

                           

What is cross-platform?

Cross-platform means that the same software can run on different operating systems without having to do any task for the software. That is, applications written in the Java language can run on different system platforms.

 

2. What is the principle of cross-platform?

Why can Java applications be cross-platform? In fact, you only need to install a Java Virtual Machine (JVM) on the operating system that needs to run Java applications. The JVM is responsible for running Java programs on the system.

 

3. Cross-platform (Graphic)

 

Because of the JVM, the same Java program can run on three different operating systems. This enables Java programs to be cross-platform. Also known as Java has good portability.

 

Java programs can run cross-platform because they don’t run directly on any underlying platform at all. Instead, they need to have their Own Java platform ready where they run (like Windows), and it’s just a matter of installing and configuring a piece of software!

4. Introduction to JVM

Java Virtual Machine (JVM); It is the abstract computer that runs all Java programs, the runtime environment for the Java language, and it is one of Java’s most attractive features. The JVM reads and processes platform-independent bytecode (class) files that have been compiled.

 

Note: The Java language is cross-platform because Java applications require the Java Virtual machine JVM to run.

The Java Virtual Machine JVM is not cross-platform, and the corresponding Java virtual machine JVM needs to be installed for different operating systems.

 

[Learning Effect]

Master cross-platform principles and understand JVMS. Text description

 

【 句 型 操 练 】

Before you can use any language, you must first install the runtime environment for that language! So before you can use the Java language, you must install the runtime environment for your Java application. The Java runtime environment is divided into JRE and JDK.

 

 

[Objective: Java development environment construction]

1, JAR, JDK differences ★★★★ ★

 

JRE(Java Runtime Environment) JavaVirtual Machine (JVM JavaVirtual Machine) and core class libraries required by Java programs. If you want to run a developed Java program, you only need to install JRE on your computer.

Java Development Kit (JDK) : The JDK is provided for Java developers to use, which contains Java Development tools, including JRE. So if you install the JDK, you don’t need to install the JRE separately.

Development tools: compilation tool (javac.exe) packaging tool (jar.exe) and so on

 

In simple terms: Java programs developed using JDK are handed over to JRE to run.

 

Why does the JDK include a JRE?

First, the development of the program, always need to run to see the effect.

Second, and most important, the development tools in the JDK are actually applications written in the Java language, packaged as exe files for easy use.

These tools will not run without the JRE.

 

2. Download and install JDK

 

You can download the Java Development Kit (JDK) from www.oracle.com.

\

 

On the Downloads TAB page, select the Java SE connection listed below

 

After you select Java SE on the above page, you will enter the following page and select Download Java

\

I am a technical, if you want to learn or exchange, add group: 451834594. I will update the learning materials free of charge at any time.

 

Select JDK to download and enter the following page to download the corresponding JDK software according to your own system.

 

The download is complete

                                                                                

JDK installation is a fool installation, the next step is the next step. However, it is recommended that the installation directory do not contain noon or Spaces.

 

3, test,

After the JDK is installed, if the installation is not successful, start the CLI (enter CMD to run the command) and switch the directory to the bin directory.

 

In this case, enter Java and Javac to check whether related information can be displayed. If the information is displayed, JDK is successfully installed.

\

[Learning Effect]

Learn about JDK download and installation tests. Hands-on practice is required after class.

【 句 型 操 练 】

A problem was discovered while testing the success of the JDK installation. Java or Javac commands can be run only when the directory is switched to the directory where Java or Javac is located. Why can some commands in Windows be run in any directory? Can commands like Java also run in any directory?

 

★★★★★ ★★★★

An error message is displayed when you type javac in the DOS command line.

 

Error Principle: The currently running program does not exist in the current directory. The Windows system searches for the program in the directory specified by an existing environment variable named Path. If not, the above error message appears. So go to the JDK installation directory \bin and run javac. The JavAC parameter information is displayed.

 

According to the principle that The Windows system is looking for executable programs, you can define the path of Java tools into the path environment variable, so that the system can help us to find the program to run.

 

1. Environment variable configuration steps

My computer – Properties – Advanced – Environment variables

2. Edit the path environment variable by adding the Java tool directory at the beginning of the value, followed by “; “. Separate it from other values.

3. Open the DOS command line and type javac in any directory.

4. If javAC parameter information is displayed, the configuration is successful.

This configuration, once and for all. For details, see environment Variable Configuration. Doc

 

2. Configuration skills

If the JDK directory is changed, you need to change the value of the path environment variable again, which can easily cause misoperations.

You can use the following techniques to avoid misoperating the value of the path variable by constantly changing the value of the path variable due to JDK directory or directory name changes.

Create a new environment variable JAVA_HOME to record the JDK directory.

Obtain the value of JAVA_HOME dynamically by %% in path.

JAVA_HOME = C: \ mysoft \ Java \ jdk1.7.0 _21

path=%JAVA_HOME%\bin; %path%

% PATH % : Dynamically gets the value of the PATH environment variable.

%JAVA_HOME% : Dynamically gets the value of the environment variable named JAVA_HOME.

 

3. Configure temporary environment variables

 

Temporary configuration: Run the set command in the DOS command

Set: Used to view information about all environment variables on this machine.

Set variable name: Views the value of a specific environment variable.

Set variable name = : Clears the value of an environment variable.

Set variable name = specific value: Defines a specific value for a specified variable.

Want to add a new value to an existing environment variable? First, we get the value of the original environment variable through the % variable name % operator. Then add the new value and define the variable name

Example: Add a new value to the PATH environment variable

Set path= new value; %path%

Note: This configuration only works in the current DOS window and in DOS Windows opened with start in this DOS window. The window is closed and the configuration disappears.

 

[Learning Effect]

1. Master the role of environmental variables.

2. Master how to configure environment variables. Must be memorized and practiced

3. Master the configuration of temporary environment variables.

 

【 句 型 操 练 】

So far, our Java development environment is basically built. With a development environment, you can write Java code in that development environment.

 

 

★★★ ★★

 

Step 1: Write

Choose the simplest editor notepad or EditPlus editor. Type in the code

class Demo

{}

Save the file as demo.java, which is the Java code file called the source file. The extension must be Java

Code description:

Class: is a Java keyword used to define a class in which all Java program code must be defined.

Keywords: Words that have been given special meaning by the Java language.

Demo: To make it easier to use this class, give it a custom class name.

{} : Defines the scope of the code in this class.

 

Step 2: Compile

With the Java source file, compile it into a file that the JVM can recognize.

In the source file directory, use the Javac compilation tool to compile the demo. Java file.

If the program has no errors, there is no warning, but in the current directory will appear a Demo. Class file, called a bytecode file, is also an executable Java program.

I am a technical, if you want to learn or exchange, add group: 451834594. I will update the learning materials free of charge at any time.

Step 3: Run

With an executable Java program (demo.class bytecode file)

Execute bytecode files by running the utility java.exe.

You are prompted that a method named main is missing.

\

Error description above:

Public static void main(String[] args){} Public static void main(String[] args){}

The modified demo. Java source file needs to be recompiled, and a new class file is generated before execution.

It turns out that no compilation failed, but it doesn’t have any effect either, because the JVM isn’t told what to do for us, that is, there’s no specific statement to execute.

To interact with the JVM, add system.out.println (“hello Java “) to the main method; Because the program is changed, so recompile, run.

 

Complete Hello World

 

class Demo
{
         publicstatic void main(String[] args)
         {
                   System.out.println("HelloWorld!"); }}Copy the code

\

Compile, run, output: Hello World!

I am a technical, if you want to learn or exchange, add group: 451834594. I will update the learning materials free of charge at any time.

 

[Learning Effect]

1. Master the process of Java programming. Code tests must be written.

2, master the use of the main method. Text description

 

【 句 型 操 练 】

There are a lot of problems with writing Hello World, so let’s summarize them.

 

 

★★★★★ ★★

The classpath configuration

Since class files (bytecode files) are Java runtime files, is it possible to execute a class file in any directory?

Following the principles of the PATH environment variable, you can define an environment variable called classpath in which the directory of the class file to be run is defined.

Example: set the classpath = c: \

The clasSPath variable value is the directory for Java class files

The path variable is the directory for Windows program files

 

The order in which the JVM looks for class files:

If the CLASSPath environment variable is not configured, the JVM simply looks for the class file to run in the current directory.

If the CLASspath environment is configured, the JVM first looks for the class file to run in the directory of the value of the classpath environment variable.

If a semicolon is added to the end of the value, then the JVM does not find the specified class file in the classpath directory and will look it up again in the current directory.

If there is no semicolon at the end of the value, then the JVM does not find the specified class file in the classpath directory, does not look for it in the current directory, and does not run it even if it exists in the current directory.

Suggestion: When configuring the CLASspath environment variable, do not add a semicolon at the end of the value. Use “if you need to access the current directory. Said.

 

\

Java Learning notes:

The Java language is case-sensitive in spelling;

Multiple Java classes can be defined in a Java source file, but at most one of them can be defined as a public class.

If the source file contains a public class, the source file must have the same name as the public class.

If a source file contains N Java classes, N bytecode files are generated after compilation. That is, each class generates a separate class file with the same bytecode file name as its corresponding class name.

I am a technical, if you want to learn or exchange, add group: 451834594. I will update the learning materials free of charge at any time. \