Java basic notes (1) JAVA's historical Java Build Environment, java build

Source: Internet
Author: User
Tags change settings

Java basic notes (1) JAVA's historical Java Build Environment, java build

In addition to setting up, this article focuses on reading novels and reading them. If you don't want to read them, you can grasp the focus directly. I will change the color to indicate the focus!

English is one of the most important ways for people to communicate with each other. JAVA: One of the most important ways for communication between people and computers. In addition to the java language, we can also use the latest python C ++ C # asp php Go language. The world of programming refers to the building of human-computer interaction. It is a translator and a repairer at the playground. The most important thing is that he is also a craftsman. He must ensure that a person can interact with a computer, and that a person can interact with a computer without exceeding the scope of his code. For example, you cannot crack your company's products. It is just as important as the maintenance of the playground facilities!

JAVA language: it is not just one of many languages. Its final role is to act as a translator, his ultimate goal is to translate the entire code you wrote into 01 and store it on the computer hard disk. All of his types are actually 0 and 1 in the computer, he said that some functions are eventually a combination of 01 in the computer. If you want to understand it, you won't be dizzy with the C language pointer. In the end, it's just a piece of 01, the so-called address is just a method that our brain can easily understand computer storage. It is not actually abstracted by our brain. We store all the addresses in functional partitions, sub-space. For example, divide the memory into four zones to store different codes! The programming language has evolved from complexity to simplification, from simplification to objects. JAVA is the language that fully faces objects. Specifically, it is the language that faces objects. It provides secure, reliable, cross-platform language, and well-written language.

Secure and reliable: the security and reliability of the JAVA language does not mean that the content written by the JAVA language cannot be cracked and is very secure. On the contrary, since the development of the programming language, the language is only a programming tool for you, and does not mean that it is responsible for cracking your product, the cross-platform nature provides a good breakthrough for decompilation. Compared with the machine language directly transcoded in C language, you cannot directly obtain your source code from your compiled product. In fact, you cannot get all the code and resources of your product even across platforms, because many code blocks are lost during compilation!

Cross-platform language: it is an irreversible development. The modern development programming language team either creates a new and better programming mode or inherits the cross-platform factor for development. So here we need to know, what is cross-platform, what is its benefit? On Earth, we have many countries, including China, the United States, Japan, and South Korea. They are like platforms for human interaction, computers also have platforms for human interaction, such as XP and linux unix. We humans now define ten common languages for human interaction: chinese, English, Spanish, French, Portuguese, Arabic, Russian, Japanese, German, and Korean. However, if we compile a product in a programming language in a computer, it cannot be used across platforms. This is embarrassing, not only is it a long development cycle, the development cost is also doubled. Therefore, in order to enable all languages to run a product together and benefit from one programming for life, the idea of cross-platform is introduced. The idea of cross-platform is implemented in JAVA through JAVA virtual machine. It's like we are talking to humans. When the language is disconnected, open the translation APP or ask a translator to let them communicate with each other. But computers are different. We humans are usually different models of a series. The systems in the computer are completely different series. Therefore, JAVA is simply implemented through a virtual machine. The development team develops a virtual machine on each system. The characteristic of this virtual machine is that it can know the JAVA code, therefore, we write JAVA programs in the corresponding virtual machine, not the original system. The quality of the virtual machine is also a part of our code. Different from the C language, the quality of the Code is absolutely determined by the compiler, but JAVA is good or bad. You can let the virtual machine version back a part of the pot later.

Rigorous writing: when we write C language, there is no problem in writing overflow or using code indiscriminately. Besides, the translator will correct some mistakes, but eventually there will also be a bug, but JAVA is different. If the type is not rigorous and the following code is still written under the condition that break is not available, the java compiler will report an error. This is the difference between the language and the system and the language and the virtual machine. After JAVA develops a virtual machine, it can control your entire code, while the C language is for the system, therefore, the C language is very limited to the rigor of your program. You can only correct some common errors.

 

JAVA Language History: if we talk about history first, according to our school's attitude, a teacher will tell you the Equation directly, not telling you what the equation is, you cannot hear it. If the English teacher tells you before learning English, we can go to a cruise ship to work in order to learn English. The salary is very high and foreigners will tip us back. South Korea, Japan, India, and sweat are easy to communicate with children in these countries, and most of our country's children are just like idiots in English. If you do not learn English, you will not be able to understand programming in the future, and you will not be able to understand the help documentation. At this time, you will learn English and why you do not know what to learn. For example, I tell you that JAVA is a high-level language launched by Stanford in 1995, a network-oriented programming language: the object-oriented thinking comes to the lives of programmers who have been struggling to work overtime, so that they no longer worry about working overtime and are worried about learning a language again, some even go to the end of their careers.

JAV Environment

Before building a JAVA environment, we need to understand two points: 1.JRE 2.JDK!

JRE: it is a JAVA Runtime Environment, including JVM (Java Virtual Machine (JAVA Virtual Machine) and core class libraries required by JAVA programs. If you only need to run JAVA programs, you only need to install JRE.

JDK: JAVA development kit, including the tools required by the program, with JRE. By the way, JAVA will install two JRE, but you 'd better install them!

Environment setup steps:

1. Download and install

2. Configure the system environment

3. debug the JAVAC command

4. debug JAVA commands

5. Write a piece of code to print "holle word"

 

---------------------------------------------------------------------------- The following figure shows the environment building process!

1. Enter the official website download page or Baidu download JRD Development Kit official website address: http://www.oracle.com/technetwork/java/

2. Double-click to run the download file. Go to the installation file!

 

3. click Next.

4. Pay attention to the section in the red box. If you want to change the default installation directory, click Change settings to change the directory, and then click Next To go to the installation!

5. the installation of JRE will pop up. Note that because JDK has a JRE, if the same directory is installed, it will overwrite the original jdk jre, therefore, we recommend that you create a JRE + version directory in the same directory.

Note: Here is the JRE installation. You can create a directory JRE1.8.0 to the same directory or directly use the default one, and then click Next!

6. After installation, open CMD to enter the installed jdk directory and enter the javac command (compiler)

7. Enter the java command (execute the JAVA program)

 

8. If the above command is entered, the above content will be displayed normally, indicating that the installation is successful. In this case, we need to configure system variables. So we need to understand why we need to configure system variables?

① Sometimes, for example, after we write the code, we store it on disk D. At this time, we need to compile and run the file, first enter the JAVA directory, and then enter the file path later!

 

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.