Java language Overview

Source: Internet
Author: User
Tags create directory java web java se

Java language Overview DOS commands

1. Switch disk: E:

2. Create directory: MD Test

3. Go to folder: CD test

4. Recursive creation of directories: MD test1\test2

5. Delete directory: Rd TEST\TEST1

6. Return to Parent directory: CD.

7. Create an empty file: Echo > Test.txt

8. Enter content into the file: Echo Hello World > Test.txt

9. Delete files: del test.txt

10. Clear panel: CLS

11. Exit: Exit

Java Program operating mechanism

Java Virtual machine (Java VM)

garbage collection mechanism (garbage Collection)

1. Core mechanism-java virtual machine: The JVM is a virtual computer with instruction sets and uses different storage areas. Responsible for executing instructions, managing data, memory, registers. The JVM is used to run Java applications that have different virtual machines for different platforms. The Java Virtual machine mechanism masks the difference between the underlying platform and implements "compile once, run everywhere".

2. Core mechanism-garbage collection garbage collection: Reclaim memory space that is no longer in use. In languages such as C + +, the programmer is responsible for reclaiming useless memory. Java does not require programmers to reclaim useless memory: It provides a system-level thread to track the allocation of storage space. And when the JVM is idle, check and release the storage space that can be freed. Garbage collection is performed automatically during Java programs, and programmers cannot control and intervene precisely.

Features of the Java language

Feature one: Object-oriented two basic concepts: Class, Object three major features: encapsulation, inheritance, polymorphism

Feature two: Robustness absorbs the advantages of C/C + + language, but it removes the part that affects the robustness of the program. such as: pointers, memory applications and releases, etc.

Feature three: 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.

JDK installation and configuration of environment variables

New Java_home variable: C:\Program files\java\jdk1.8.0_171 (JDK installation path)

Added CLASSPATH variables:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar

Path variable after add:%java_home%\bin;%java_home%\jre\bin

Test:

Open cmd input java-version

Expand:

* Java SE (Java platform,standard Edition). Java SE was formerly known as J2SE. It allows you to develop and deploy Java applications that are used in desktops, servers, embedded environments, and live environments. Java SE contains classes that support Java WEB Service development and provides the foundation for Java platform,enterprise Edition (Java EE).

* Java EE (Java platform,enterprise Edition). This version was formerly known as the Java EE. The Enterprise Edition helps develop and deploy portable, robust, scalable, and secure server-side Java applications. Built on the Java SE, Java EE provides Web services, component models, management, and communication APIs that can be used to implement enterprise-class service-oriented architecture (service-oriented Architecture,soa) and Web 2.0 applications.

* Java ME (Java platform,micro Edition). This version was formerly known as J2ME. Java ME provides a robust and flexible environment for applications running on mobile devices and embedded devices such as mobile phones, PDAs, TV set-top boxes, and printers. Java ME includes a flexible user interface, robust security model, many built-in network protocols, and rich support for Web and offline applications that can be dynamically downloaded. Applications based on the Java ME specification need to be written once, can be used for many devices, and can take advantage of the native capabilities of each device.

* Jre:java Runtime Environment

* Jdk:java Development Kit

The JRE, as its name implies, is the Java Runtime Environment, which contains the Java virtual machine, the Java base Class library. The software environment that is required to run a program written in the Java language is provided to the user who wants to run the Java program. The JDK, as its name implies, is the Java SDK, the developer kit needed by programmers to write Java programs in the Java language, and is available to programmers.

The JDK contains the JRE, as well as compiler Javac, which compiles Java source code, and includes many tools for debugging and analyzing Java programs: JCONSOLE,JVISUALVM and other tools, as well as the documentation and demo example programs that Java programs need to write. * If you need to run a Java program, just install the JRE. If you need to write a Java program, you need to install the JDK.

Java language 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.