1: To learn Java The first step is to build the Java environment, is to install the JDK, and because the JDK contains the JRE, so in the process of installing the JDK installed the JRE, so the following is only the JDK installation package, download the installation itself
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2: Focus on environment variable configuration
Start with advanced system settings, System security, Control Panel
And then
Click Environment variables
And then
After clicking on the environment, you can choose to edit or create a new (existing edit, not existing on the new)
and then
Set 3 properties in "System variable", Java_home,path,classpath (case does not matter), if already exist then click "Edit", not exist then click "New".
The variable setting parameters are as follows:
- Variable name: java_home
- Variable Value: D:\Program Files (x86) \java\jdk1.8.0_91//This path is the path to install the JDK installation package yourself, and your JDK will fill in whatever path you have installed.
- Variable name: CLASSPATH
- Variable value:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; Remember, there's a "." in front.
- Variable name: Path
- Variable value:%java_home%\bin;%java_home%\jre\bin;
If you remember good words java_home and classpath These two need to create themselves, java_home this is the path of their own JDK. Then copy and paste the above contents into your own variable values. Path is already present, as long as the last side of the variable value of path is copied and pasted to your computer
3: Finally and most importantly, verify that your environment variable configuration is successful, as shown in
First open the computer's command line, Win+r shortcut to open the Windows command line quickly, open the command line input cmd can open the command line interface, and then enter Java to verify, and then enter the Javac for verification, if it shows the same as mine, then congratulations, environment variable configuration success , then the Java program can be developed.
Finally, if you want to see the JDK version of your Java environment, you can enter it at the command line
Java-version (Note that you do not need to add English semicolons)
Finally, if the best way to close the command line interface is to enter exit, it is best not to close the command-line format directly by X.
Well, now you can happily develop Java programs
Building the Java Development environment (Configuring the Java Development environment)