Explain the construction of java development environment in detail

For any language development, the primary link must be the construction of the development environment, as is the Java language. This article will comprehensively analyze the construction of java development environment from the perspective of theory + practice, including JDK, IntelliJ idea, mysql, Navicat and some key points.

For novices, it is recommended to look at the third and fourth parts (actual operation part) first, and then the first part.

I. overview of key technical points

1. Why can Java cross platform

The reason why Java programs can cross platforms is that Java programs run on the JVM, which shields the differences of the underlying operating system. So, what is the JVM description? JVM is what we call JRE (or JDK)

2. Differences between JDK and JRE

JDK is the development version of the JVM, and JRE is the release version of the JVM;

3. There are three ways to set environment variables. Which should be selected?

To set the environment variable, you should select Java_ Home and path variables because:

From jdk1 After 5, when installing JDK, there is a classpath variable by default, so it does not need to be configured;

The path variable value is% Java_ Home% \ bin is the main factor to solve the problem of modifying the path variable when the JDK path changes;

4. What is the principle of Java execution?

The Java source file (. Java) is used by the JDK compiler javac Exe is compiled into a file recognized by the JVM (. Calss file), and the Java executor of JDK is Java Exe will Class file to output the results

The following is javac under the bin directory of the JDK installation directory Exe and Java exe

Test the code:

Create a java source file under E: \ javademo \ with Notepad + +: mytest java

View Code

Compile with command line tools

First check whether there is mytest under E: \ javademo Java file

Use javac Exe compile mytest java

After compilation, generate a mytest. Exe under E: \ javademo \ Class file

Use Java Execute mytest. Exe command Class file

4. What is Tomcat?

Tomcat is a server container used to receive requests and respond to requests. The following is its basic architecture

II. Basic DOS commands

1. CD (change directory): switch directories

Switch to the current disk root directory: CD/

Switch to the specified directory: CD directory

Switch the current directory to the previous Directory: CD

Switch to e disk: e:

2. Dir (directory): view the directory

3. MD (make directory): create directory

III. preparation of materials

IV. detailed installation configuration

(1) JDK installation

1. Official website

https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html

2. Description

As a virtual machine of Java, JDK has three categories: Java EE, Java Se and java me.

3. JDK installation mode

JDK can be installed in two ways: decompression installation and executable file installation (. EXE file)

4. JDK executable installation

Double click the downloaded EXE file

next step

Select the installation path and click next

Installing

Installation succeeded, close

The following JDK directory after successful installation

(2) Configure environment variables

After the JDK is successfully installed, next configure the environment variables

1. The first method: only configure the path variable

My computer, right-click the property and select advanced system settings

Advanced = environment variables

Add the bin directory of the installed JDK to the path variable under the system variable (my name is C: \ program files \ Java \ jdk-11.0.1 \ bin)

determine

determine

Test whether the environment variables are configured successfully

Win + R, CMD, enter

Enter javac in the DOS category, as shown below, indicating that the installation is successful

View JDK version

2. The second method: configure Java_ Home and path variables (recommended)

Setting Java_ The home variable is used to save the JDK installation path, and the path variable refers to the JDK path

Add Java in the system variable column_ Home variable (if java_home variable does not exist)

The path variable references Java_ Home variable

3. The third method: configure Java_ Home, path, and classpath variables

The classpath variable does not need to be configured after jdk5. It is configured by default when installing JDK

(2) Install Tomcat

Double click the Tomcat executable

Continue to the next step and select the JDK installation path

Next, install

installation is complete

Start Tomcat manually

start

Enter in the browser http://localhost:8080 , if the following interface appears, the installation is successful

(3) Install MySQL

Double click the MySQL installation file

Accept = next

Select development version = next

Next

Next

Execute

Always next,

Set password, next

Next, execute

Finish

Continue to next until the installation is complete

(4) IntelliJ idea

Double click the executable

Next

Select the installation path and click next

Select 64 bit, next

install

Installing

Installation complete

Crack

Download activation jar package

Activation step

(5) Navicat installation

Double click the installation file

next step

Agree = next step

Continue to the next step, installation

installation is complete

Interface

V. copyright area

Thank you for your reading. If there are any deficiencies, you are welcome to give advice, learn and make progress together.

Blogger website: http://www.cnblogs.com/wangjiming/ 。

A few articles are integrated by reading, reference, quotation, plagiarism, copying and pasting, and most of them are original.

If you like, please recommend it; If you have new ideas, you are welcome to put them forward. Email: 2098469527@qq.com 。

You can reprint this blog, but it must be from a well-known blog source.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>