Writing in the front

This article records in the work study for some things do not understand the record and arrangement, hope can help you

The text start

One, JDK, JRE, JVM

First look at the Full name of the English and the corresponding Chinese translation is not the heart should have an answer

  • JAVA DEVELOPMENT KIT (JDK) JAVA DEVELOPMENT KIT
  • JAVA RUNTIME ENVIRONMENT (JRE) JAVA RUNTIME ENVIRONMENT
  • JAVA VIRTUAL MACHINE (JVM) JAVA VIRTUAL MACHINE

Let’s draw a graph to understand the relationship between the three

In a nutshell

  • The JDK is for developers who write Java
  • JRE is a Java-oriented program
  • The JVM is Java-oriented bytecode

Steal a picture of the whole family in a bucket

Java SE, Java EE, Java ME

  • Java Standard Edition (Java SE) Java Standard Edition
  • Java Enterprise Edition (Java EE
  • Java Mobile Edition (Java ME

Java SE is used to develop and deploy Java applications on desktops, servers, and embedded devices and real-time environments. Java SE includes class libraries for developing Java Web services, with advantages such as writing a one-run, easy-to-access JDBC API for databases, CORBA technology, and a security mode that can protect data in Internet applications.

Java EE is an architecture that simplifies the development, deployment, and management of complex problems associated with enterprise solutions. It inherits many of the benefits of Java SE, while also providing full support for EJB (Enterprise JavaBeans), Java Servlets API, JSP (Java Server Pages), and XML technology. The ultimate goal is to be an architecture that allows enterprise developers to dramatically reduce time-to-market.

Java ME provides a robust and flexible environment for applications running on mobile and embedded devices such as mobile phones, PDAs, TV set-top boxes, and printers. Java ME includes a flexible user interface, a robust security model, many built-in network protocols, and rich support for networked and offline applications that can be downloaded dynamically.

To summarize, Java SE is the standard edition, containing the standard JVM and standard libraries; Java EE is the enterprise version, it is only on the basis of Java SE plus a large number of apis and libraries, so as to facilitate the development of Web applications, databases, message services, etc. Java EE applications use the same virtual machine as Java SE.

Note: After Java5.0 version, J2SE, J2EE and J2ME were renamed Java SE, Java EE and Java ME respectively. Due to customary reasons, we still call them J2SE, J2EE and J2ME.

GroupID, ArtifactID, and Version in Maven

A one-sentence understanding of GroupID and ArtifactID facilitates the unique location of an item; GroupID and ArtifactID are project identifiers (coordinates) to ensure project uniqueness;

GroupID is generally divided into several segments, the first for the domain, the second for the company name. The domain is divided into org, com, CN, and many others. Org is a non-profit organization, and com is a commercial organization. Take the Apache Tomcat project as an example: the GroupID of the project is org.apache, its domain is org (because Tomcat is a non-profit project), the company name is Apache, and ArtifactID is Tomcat.

GroupID is the unique identifier of the project organization and the actual package structure for Java, which is the Java directory structure in the main directory. ArtifactID is the unique identifier of the project, and the actual project name is the name of the project root directory.

Here’s an example:


<! -- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<! Spring Core version 5.3.7-->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>5.3.7</version>
</dependency>


<! -- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<! -- Alibaba launches FastJSON version 1.2.76-->
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>fastjson</artifactId>
    <version>1.2.76</version>
</dependency>


<! In the future your projects can be named in a similar way -->
<groupId>com.companyname.project-group</groupId>
<! Select * from groupId where groupId = groupId; select * from groupId where groupId = groupId;
<artifactId>project</artifactId>
<! -- Version number -->
<version>1.0</version>

Copy the code

conclusion

A good memory is not as good as bad writing. I learned this saying from my childhood. Until today, I only remember this saying for bad writing just stays on my lips. Practice this saying and truly understand it.

The resources

Java SE Documentation