Learning Java has been a long time, but the overall feeling of the foundation is not very good, sometimes encountered some ordinary problems will not be able to start, but also from the side of some of their own problems. So, want to write Java handy notes to consolidate the foundation, strengthen learning. Today is the first, mainly Java installation, configuration, which is often said Hello world.
First, download
Go to Oracle's website, download Java JDK,
second, the installation
The installation is simple, only need the next step can be, the path can be selected according to their own needs.
Third, the configuration
You cannot compile the program after installing the JDK, because you also need to configure the Java JDK. The system attributes entered-> advanced-> environment Variables-> system variables. Then add the Path,classpath variable,
Path: D:\Program Files\java\jdk1.7.0_07\bin (because there is a semicolon at the front so the reason for this is to be the first to find him, convenient efficiency)
Classpath: .;D: \ Program Files\java\jdk1.7.0_07\lib\tools.jar;d:\program Files\java\jdk1.7.0_07\lib\dt.jar (no semicolon required at end)
I take the Win7 system as an example, look at the picture:
-
Four, test
The installation is configured so that you can test whether the installation was successful. Into the cmd, into the "javac" command, if shown below to indicate that the installation is successful, otherwise the installation is not correct, you need to reinstall.
So the Java installation configuration is good, the next step is to use it to write programs.