Series of pink Shoes Aunt article source: HTTP://WWW.CNBLOGS.COM/XTYPR welcome reprint, translation, please also keep this statement, greatly appreciated.
Nukkit plugin starting from 0: setting up the environment
| Prev: No |
Catalog: Nukkit plugin starting from 0 |
Next article: not yet written |
Considering that many readers are first contact with Java programming, or the Nukkit plugin as their first Java application, I will explain all the steps in detail, if there is a bad excuse.
Installing Java 8
Because Nukkit uses the new features of Java 8 to optimize performance and code readability, you must install the JDK 8来 development Nukkit plugin.
Open the Console (Windows press the logo key +r, enter CMD in the pop-up window, and then enter; Linux opens the console directly), type the following code and enter:
Javac-version
The returned results should resemble the following (the author is using JDK 1.8.0_60, there may be an updated version of Java):
Javac 1.8.0_60-ea
If similar to the above results, congratulations you have successfully installed JDK 8, you can skip this step of the tutorial.
If the returned version is 1.7.0 or an older version, or if the return is similar to "' Javac ' is not an internal or external command, or a program or batch file that can be run," You have not installed the latest version of the JDK. Please open the link below to download the latest version of jdk:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
After you find the above page, read the appropriate terms and click "Accept License Agreement" to agree, select your own system's JDK installation package from the right "Download" column to download the installation. The installation process varies by system and is not explained in detail here.
The JDK installation package also contains the corresponding version of the JRE, so you do not need to download and install the JRE once on the Java official website.
After installing the JDK on your Windows system, you need to configure environment variables to ensure that the command line is working properly. Here is an example of Windows 7 that explains how to configure environment variables.
-Right-click on "Computer", click "Properties",
In the pop-up window, click "Advanced System Settings", "Environment variables",
-click "New" under "System Variables", in the popup window "variable name" input "java_home" (without quotation marks), "Variable value" enter the installation path of the JDK you previously installed, mine is "C:\Program files\java\jdk1.8.0_60" (without the quotation marks), which is entered here according to the path where you installed the JDK. Then click OK
-In "System variables" look for "Path" (without quotation marks) variable, select and click "Edit", in the "Variable value" of the last side (note not the entire replacement, is added in the last side) input:
%java_home%\bin;%java_home%\jre\bin;
Then click "OK".
It is important to note that there is no number at the end of the value of the original path, if not, enter it first, and then enter the above code.
-click "New" under "System Variables", in the popup window "variable name" input "CLASSPATH" (without quotation marks), "Variable value" Enter the following string (note that there is a point ".") Don't forget it):
.; %java_home%\lib;%java_home%\lib\tools.jar
Then click "OK".
-Check whether the configuration was successful. Click the Windows logo key +r, enter CMD and enter, in the Open console input "javac-version" and "java-version", if you can return the version information correctly, the configuration environment variable is successful. At this point, your JDK is installed and configured to complete.
After installing JDK 8, you will also need a code editing and debugging tool to help you with your development. A suitable IDE is the best choice for you.
Installing the IDE
Configuring the development environment with IntelliJ idea
| Prev: No |
Catalog: Nukkit plugin starting from 0 |
Next article: not yet written |
Nukkit plugin starting from 0: setting up the environment