Baidu has a lot of tutorials on how to get started with JDK, but most of them are less detailed and not systematic. Share the JDK download, environment configuration, and how to use it below.
Install the JDK first, in general, the installation directory is the C-drive program (x86) directory.
The next most important part: Configuring the Environment
1. Right-click My Computer-Properties-Advanced system Settings-advanced-environment variables--Find the path in the system variable (if no new directory is selected)
2. If there is already an item in path, add it after the project; If you do not skip this step, click New directly under the WIN10 system
3. Locate the JDK installation directory in My computer and locate it in the Bin folder, and copy the location.
4. Paste the position in the value of the variable in path
In general, the configuration is successful, let's test
Windows+r Start Run
Input cmd boot dos
Enter JAVAC in the DOS interface
If a lot of configuration information appears, the configuration is successful
Conversely, if a word such as an invalid command appears, the configuration does not succeed
So after the configuration is successful, how do you write the program next?
We're going to use a software that has a few people on every computer--notepad.
Use Notepad to write a simple program, general beginners with HelloWorld
As follows:
Save as Helloworld.java file type for all files
Then start the DOS command
Enter the save location after the CD with the text you just added
Then enter Javac Helloworld,java
Continue entering Java without errors. HelloWorld
And then enter
Hello World appears
That's when the build was successful.
Getting started with getting started with Java--JDK