Java zero-based study notes (Day01)

I. Overview of the Java language

   1 Overview

       Defined: the Java is an object-oriented, cross-platform technology also supports generic programming in a high-level programming language.

High-level programming languages: from writing code [using a fixed format and syntax], must be handed over to the computer through after a certain treatment will be carried out to identify the programming language, Java is one of them.

       Features:

             1. Object Oriented (individual learning)

             2. Cross-platform

             3. support Generics (individual learning)

       Scope: the Java suitable for WEB development and development of enterprise-class mobile terminal (games, finance, banking ,,,).

       Origin: In 1994 and 1995, James Gosling

       Development process: Sun-related companies organize in 1996, released a development environment developers can use the JDK1.0

                      In 1997 JDK1.1 version

                      In 1998 JDK1.2 version

                      In 2000 JDK1.3 version

                      In 2002 JDK1.4 version

                      In 2004 JDK1.5 version

                      In 2006 JDK1.6 version

                      In 2009 the company was acquired by Oracle Corporation sun

                      2011 JDK1.7 version

                      2014 JDK1.8 version

                      2017 JDK10, JDK11 version

                      2018 JDK12, JDK13 version

                      2019 JDK1.1 version

                      2009 JDK1.1 version

     But in the domestic market developed using the most used version is the version JDK7 and JDK8 version.

   2. Cross-platform

      Overview: compile once run many times, writing a Java code that can be run on any system after the compilation process, ignoring the system, this site is called cross-platform. Premise: Java code is actually run on a virtual computer is running, the system just to install the corresponding version of the virtual computers can be cross-platform.

      Virtual machine: the Java Virtual Machine jvm.

Environment provided with the presence of the virtual machine to achieve a cross-platform Java, the system want to execute Java code, you must first install the system corresponding version of the virtual machine on it.

   3. jvm, jre, jdk

      Java is a high-level programming language, have their own fixed format and syntax, object-oriented language, it is necessary to use other resources already written, at run time the need to use resources already written ready to run It requires resources.

      the JVM: the Java virtual machine.

      jre: the Java runtime environment (included jrm run of the resources required)

      the JDK: the Java development environment [jre contains some resources and develop the code needed if we are a business, just put the compiled code runs, only need to install jre on it.

  4. Java development environment to build

    The official website to download and install www.oracle.com

 

Second, the case study entry

   Step 1. Run the Java code

       1.1 write source code

       1.2 to compile the source code, compiled into the contents of the computer can be appreciated. Format: Javac file name .java

       1.3 computer begins to run the compiled code. Format: the Java .class file name

   Introduction 2. jdk directory

       bin: to store jdk run with some programs.

       include: information c language.

       jre: jdk jre that comes with environmental content.

       lib: storage jdk provide resources written [core libraries]

   3. Write Getting Case

       Where to write? No configuration environment variable, the requirements must be written in jdk's bin folder below

       The first step: writing source code

       In jdkx bin folder under the file name to create a .java file, to write source code that can be used in a fixed format file.

       Step two: compile the source code

       Open the black window at the path where the file, enter javac HelloWorl.java Enter in the black window, you can compile the

       The third step: Use java program to execute the compiled code

       Finish writing the entry cases.

    4. Getting Case Notes

        1.1 class named themselves after the word can, but must be named and the file name remains the same, otherwise the compiler will go wrong.

        1.2 source code is not free to change the word, should be strictly in accordance with the case-writing.

        1.3 source code must be the punctuation punctuation English state, do not write Chinese symbol.

    

Third, the environment variable configuration

   1. Role: solve the problem of the source file is not normal bin folder can not be compiled

    2. two ways:

       2.1 Direct configuration method: Add Javac program directly in our computer system variable path variable path inside. Where the system variables? In computer [this computer] properties --- Advanced System Settings Environment Variables --- --- --- path system variables

       2.2 of variables: JAVA_HOME variable increase in system variables, content: the installation path jdk

                         Introducing JAVA_HOME, in a manner path system variables:% JAVA_HOME% bin backslash

 

Four, Eclipse installation     

   view 和 perspective 

   1. view

      1.1 package explorer: package manager, package-level project management

      1.2 code compiler view: area used to write source code

      1.3 Task Task window, unfinished task management combined with general comments // TODO

      1.4 Tasklist: Task List to record the future plans of doing tasks

      1.5 Outline: displaying contents inside a class construct

      1.6 Console: Console, display the code running results

   2. Open New View: window - Show View - View you want to use

   Perspective 3.:   view of a combination is the perspective, upon completion of the development of different functions, needs are different combinations of view, is the need to use a different perspective

   4. Perspective conventional (combination of view)

       4.1 Java perspective: for the first stage of the Java development and learning

       4.2 JavaEE perspective: for the development of the website and other systems

       4.3 Dedug perspective: at the time of the test program, view a combination of

   5. perspective operation

       5.1 You can set your favorite view layout, window - perspective - save perspective as to create their own like the layout a name for the myjava

       5.2 window chaos how to do? : Window - perspective - reset perspective

 

Guess you like

Origin www.cnblogs.com/nastu/p/12296932.html