# # #配置JAVA开发环境 # #
1. Download and install the JDK
Download JDK (Java develop kit) Java SDK via www.oracle.com website
Install the downloaded JDK in a fool-friendly installation
Note: The installation path cannot have Chinese presence
2. Configure Environment variables
Right-click My Computer--Properties--Advanced system settings-environment variables
Under System variables, click New--Set variable named: Java_home---The variable value is the path to the installation JDK--confirm
under System variables, locate path and double-click Win10 under new (Win7 directly in front of the top input)%java_home %\bin --Confirm
3. Verify that the configuration is successful
Tap Keyboard win+r--Input cmd--input java-version
That means we've got it all together. Next we'll finish the first program "Hello World"
1) Create a new text under the path
2) Enter the main program of HelloWorld
Class helloworld{
public static void Main (string[] args) {
System.out.println ("Hello World");
}
}
After saving, change the extension to. java
4) Enter a disk in cmd: Set the path to that disk--CD just as we entered a good file path
5) Compile the program into class file by Javac
After compiling, A. class file with the extension will appear.
6) Execute the first program Hello World
Enter Java HelloWorld
Execution Complete ~
But we can't do that every time we develop this way, so we have to have a compiler
Here is the compiler used in our development process: Eclipse
With this software we can start our Java development journey.
Next time we'll explain how to use eclipse
# # # #END # #
Related articles:
Introduction to Java Tutorial (ii) installation using Eclipse
Introduction to Java Tutorial (iii) Basic syntax (1)