Installation and configuration of java under window64

Preface

Learn java forced by life

Download JDK

JAVA DEVELOPMENT KIT(JDK) = JAVA RUNTIME ENVIRONMENT(JRE) +
JAVA tools + JAVA basic library classes. ——Mr. Gu, an enthusiastic citizen

Official website https://www.oracle.com/cn/java/technologies/javase-downloads.html#JDK15

Select the JDK Download under JAVA SE 8 and
Insert picture description here
select the windows 64-bit installation package
Insert picture description here

Install JDK

Just click the next step, remember your installation path, such as:C:\Program Files\Java\jdk1.8.0_281\

Make a check after completion and use java -versionit in cmd to view the version.
Insert picture description here

Environment variable

First open: this computer -> properties -> advanced system settings -> environment variables, start editing system variables.
1) JAVA_HOME
is the JAVA installation directory, the variable value is the above installation path C:\Program Files\Java\jdk1.8.0_281\
Insert picture description here
2) PATH
creates a new one %JAVA_HOME%\bin
Insert picture description here
3) CLASSPATH
Insert picture description here

The text editor notepad++ compiles and runs java

Should I use a notepad?

First in the plug-in management, install the plug-in NppExec.

then:
Insert picture description here
Insert picture description here

If you want to execute the java file, press F6 and click OK.

reference

[1] Java download and installation and environment configuration
[2] How to compile and run Java in Notepad++

Error log

  1. Cannot find or load the main class. After
    following [1] to complete the environment configuration, there is the following error:
    Insert picture description here
    I did not solve it, so when the notepad is running, there will be:
    Insert picture description here
    re-download. . . .

Guess you like

Origin blog.csdn.net/jokerxsy/article/details/113088173