201871010119- posts Jiaojiao "object-oriented programming (java)" in the first week learning summary

          

project

content

This work belongs courses

<Classroom teachers blog Home Links> https://www.cnblogs.com/nwnu-daizh/

Where this requirement in the job

<Job link address> https://www.cnblogs.com/nwnu-daizh/p/11435127.html

Job learning objectives

 

  1. For class to class teaching methods and teacher requirements, course of study to master the necessary software tools;
  2. Understand JVM, JRE and JDK concepts, learn to download, install, test JDK;
  3. Master PATH, CLASSPATH system variable effect and sets;
  4. Master the command-line compiler and run a Java program steps;
  5. Master the Java Application Program Structure characteristics;
  6. Master the steps to develop Java programs run under JDK command line.
  7. The initial use of Elipse, learn to compile, run, debug simple Java Application program.

 

 

            

     Part I: curriculum learning platform registered account

Platform name

Registered account or a personal blog Park Address

Park blog: www.cnblogs.com

 https://www.cnblogs.com/-8tjj/

Programming Evaluation: https://pintia.cn/

 [email protected]

Chinese University MOOC:  https://www.icourse163.org/

17834473658

The following answer yes or no

Whether to join the class curriculum group blog

 Yes

QQ group to discuss whether to join the course

 

 Yes

 Part II: theoretical knowledge and learning section

         

         Chapter One: Java Programming Overview

    Java key terms:

    (1) simplicity; (2) object-oriented; (3) distributed; (4) Robustness; (5) security; Neutral (6) architecture; (7) portability; (8) Explanatory; (9) of high-performance; (10) Multilinear; (11) polymorphism.

         Chapter II: Java programming environment

              Java language foundation

                  A: cross-platform

                  B: Java language, cross-platform principle

                  As long as the operating system needs to run java applications, install a Java Virtual Machine (JVM Java Virtual Machine) can be. By the JVM is responsible for running Java programs in the system.

         (1)JRE:

                   Including the required Java Virtual Machine (JVM Java Virtual Machine) and core libraries and other Java programs, if you want to develop a good run Java programs, the computer can only need to install the JRE.

                  JRE: JVM + class library.

         (2) JDK :( downloading and setting)

       Download site: http://www.oracle.com/technetwork/java/javase/downloads

                   JDK is available to Java developers, which contains the java development tools, including the JRE. So install the JDK, you do not have a separate installation of the JRE.

          (3) where the development tools: compiler tools (javac.exe), packaging tools (jar.exe), etc.

                  JDK: JRE + JAVA development tools.

          (4) bin directory: the directory used to store a number of executable programs.

                    As javac.exe (java compiler), java.exe (java run the tool), jar.exe (Packaging Tool) and * javadoc.exe (document generation tool) and so on.

           (5) jre directory: "jre" is an abbreviation for the Java Runtime Environment, which means Java runtime environment. This directory is the root directory of the Java Runtime Environment, which includes the Java virtual machine, runtime class package, Java application launcher and a bin directory, but does not include a development environment development tool.

            (6) include directory: JDK is due by C and C ++ implementation, so when you start the need to introduce some of the C language header files, the directory is used to store these header files.

            (7) lib directory: lib library is an abbreviation, meaning Java class libraries or library file, the archive file is to develop tools to use.

                    src.zip file: src.zip for the src folder file compression file, src is placed in core classes JDK source code, you can view the source code for the Java Foundation Classes through the file.

            (8) path environment variable configuration :( done with the help of assistants.)

                     Button click on the desktop computer → select properties → select Advanced System Settings → select Advanced tab → click Environment Variables → below the system variables find the path → Double-click the bin directory in the path → the jdk installation directory (F: \ JDK \ bin;) Tim go in and add a semicolon at the end.

                     Right-click on the desktop and select Properties → → → Click the Advanced tab select Environment Variables → Find below the system variables path → Double-click on the path → jdk bin directory under the installation directory to the left and add the semicolon.

           (9) the installation library source files and documents:

      Library source file is distributed as a compressed file scr.zip in JDK you must be depressurized before access to the source code.

      1) ensuring JDK is installed, and jdk / bin directory in the execution path.

      2) the establishment of a directory in your home directory javasrc. If you prefer, you can complete this step in a terminal window.

      3) Locate the file src.zip under jdk directory.

      4) Save the file compression to javasrc scr.zip directory. In a terminal window, execute the following command:

                            cd javasrc

        jar   xvf  jdk/src.zip

        cd......

     (10) using a command-line tool:

                      1) Open a terminal window.

      2) Enter corejava / vl2h02 / Welcome directory (the directory is mounted corejava sample source code book)

      3) enter the following command:

        javac Welcome.java

        java Welcome

 Part III: Experimental part

      1. Experiment name: experiment a Java programming environment

      2. Purpose:

      (1) Installation and configuration of JDK master;

      (2) master the basic commands and steps to use JDK develop Java programs;

      (3) proficiency in the use Elipse integrated development environment for developing the basic steps java program

      (4) master the basic syntax of Java programs.

      3. Experimental procedure and content:

        Experiment 1 JDK installation and configuration

        Experimental Procedure:      

        (1) from http://www.oracle.com/technetwork/java/javase/downloads /index.html download jdk12.0.2;

        (2) Install the JDK;

        (3) configuration environment variable

      path and classpath specify JDK command search path and the Java class path.

      (1) set the environment variable path is the role of the operating system can find the JDK command.

      Role (2) set the environment variable that tells the Java class path class loader where to find the classes provided by third-party and user-defined classes. JVM and other JDK tools to locate by sequentially search platform library, library extensions and class path.

       Configuration environment variable operation as shown below:

      

  Experiment 2 download package textbook example

                   Download link to this page: http: //horstmann.com/corejava/, file name: corejava.zip

            

                           

 

         

  Experiment 3 command-line compiler program run Welcome.java       

           Experiments carried out by the following procedure

(1) Create a directory d: \ java. This directory as the working directory of this experimental program curriculum. Java source code, compiled bytecode files are placed in this directory.

(2) Start a text editor (e.g. tablet, Notepad) copy of the source code. Textbook Chapter 2 sample program (Welcome.java). 

    as follows:

/**

 * This program displays a greeting for the reader.

 * @version 1.30 2014-02-27

 * @author Cay Horstmann

 */

public class Welcome

{

   public static void main(String[] args)

   {

      String greeting = "Welcome to Core Java!";

      System.out.println(greeting);

      for (int i = 0; i < greeting.length(); i++)

         System.out.print("=");

      System.out.println();

   }

}

 

(3)保存程序。注意:保存源程序时,程序名要与主类名一致。所以用Welcome.java作为本程序的文件名。如果用记事本编写程序,因记事本默认的扩展名是.txt,所以要给文件名加引号后保存。把该文件保存到目录d:\java中。

(4) 编译程序

在目录 d:\java>后输入以下命令编译源程序成为字节码程序

javac Welcome.java

如果编译成功,则在d:\java目录中生成字节码文件Welcome.class。如果不成功,则显示错误信息,用户可修改错误,

(5)运行程序

在目录d:\java>后输入Welcome可运行通过编译的程序。

(6)观察程序运行结果,并理解java基本程序结构。

 实验4    用JDK命令行开发HelloWorld!程序

        

/**

 * This program displays a greeting for the reader.

 * @version 1.30 2014-02-27

 * @author Cay Horstmann

 */

public class Welcome

{

   public static void main(String[] args)

   {

      String greeting = "Hello World!";

      System.out.println(greeting);

      for (int i = 0; i < greeting.length(); i++)

         System.out.print("=");

      System.out.println();

   }

}

                    

        

         实验5    下载安装Eclipse集成开发软件包

         下载网址:https://www.eclipse.org/downloads/

      

          实验6    利用Eclipse开发程序输出九九乘法

      

 4. 实验总结:

          第一章:Java程序设计概述

    Java关键术语:

    (1)简单性;(2)面向对象;(3)分布式;(4)健壮性;(5)安全性;(6)体系结构中立;(7)可移植性;(8)解释性;(9)高能性;(10)多线性;(11)多态性。

         第二章:Java程序设计环境

        1、Java语言基础

                  A:跨平台性

                  B:Java语言跨平台原理

                  只要在需要运行java应用程序的操作系统上,先安装一个Java虚拟机(JVM Java Virtual Machine)即可。由JVM来负责Java程序在该系统中的运行。

         (1)JRE:

                   包括Java虚拟机(JVM Java Virtual Machine)和Java程序所需的核心类库等,如果想要运行一个开发好的Java程序,计算机中只需要安装JRE即可。

                  JRE:JVM+类库。

         (2)JDK:(下载和设置)

       下载网站:http://www.oracle.com/technetwork/java/javase/downloads

                   JDK是提供给Java开发人员使用的,其中包含了java的开发工具,也包括了JRE。所以安装了JDK,就不用在单独安装JRE了。

          (3)其中的开发工具:编译工具(javac.exe) 、 打包工具(jar.exe)等

                  JDK:   JRE+JAVA的开发工具.

          (4)bin目录:该目录用于存放一些可执行程序。

                    如javac.exe(java编译器)、java.exe(java运行工具),jar.exe(打包工具)和* javadoc.exe(文档生成工具)等。

           (5)jre目录:"jre"是 Java Runtime Environment 的缩写,意为Java程序运行时环境。此目录是Java运行时环境的根目录,它包括Java虚拟机,运行时的类包,Java应用启动器以及一个bin                     目录,但不包含开发环境中的开发工具。

            (6)include目录:由于JDK是通过C和C++实现的,因此在启动时需要引入一些C语言的头文件,该目录就是用于存放这些头文件的。

            (7)lib目录:lib是library的缩写,意为 Java 类库或库文件,是开发工具使用的归档包文件。

                    src.zip文件:src.zip为src文件夹的压缩文件,src中放置的是JDK核心类的源代码,通过该文件可以查看Java基础类的源代码。

            (8)path环境变量配置方法:(在助教的帮助下完成。)

                     键点击桌面计算机→选择属性→选择高级系统设置→选择高级选项卡→点击环境变量→下方系统变量中查找path→双击path→将jdk安装目录下的bin目录(F:\JDK\bin;)添进去并在结尾添                       加分号。

                     右键点击桌面计算机→选择属性→选择高级选项卡→点击环境变量→下方系统变量中查找path→双击path→将jdk安装目录下的bin目录添加到最左边并添加分号。

           (9)安装库源文件和文档:

      库源文件在JDK中以一个压缩文件scr.zip的形式发布,必须将其减压后才能够访问源代码。

      1)确保JDK已经安装,并且jdk/bin目录在执行路径中。

      2)在主目录中建立一个目录javasrc。如果愿意,可以在一个终端窗口完成这个步骤。

      3)在jdk目录下找到文件src.zip。

      4)将scr.zip文件减压缩到javasrc目录。在一个终端窗口中,可以执行以下命令:

                            cd    javasrc

        jar   xvf  jdk/src.zip

        cd......

     (10) 使用命令行工具:

                      1)打开一个终端窗口。

      2)进入corejava/vl2h02/Welcome目录(Corejava是安装本书示例源代码的目录)

      3)进入下面命令:

        javac Welcome.java

        java Welcome

    通过老师讲解,助教的帮助,成功安装了java开发工具包。下载了和设置了jdk;安装了库源文件和文档;从命令行编译并运行Java程序。

Guess you like

Origin www.cnblogs.com/-8tjj/p/11441087.html