Configuring the Java Environment
Scenario
Table 1 describes the environment required for secondary development.
Item |
Description |
---|---|
Installing the Operating System (OS) |
Windows OS. Windows 7 or later is recommended. |
Installing the JDK |
Basic configurations of the development environment. JDK 1.7 or 1.8 is required. You are advised to use JDK 1.8 for better compatibility of later versions. |
Eclipse installation and configuration |
It is a tool used to develop DLI applications. |
Procedure
- Download JDK of 1.8 or a later version from the Oracle's official website, install the JDK, and configure Java environment variables.
- Install the JDK.
- Set environment variables. Specifically, choose Start > Control Panel. Click System > Advanced system settings. In the displayed System Properties dialog box, click Advanced and then click Environment Variables to switch to the Environment Variables dialog box.
- Create the system variable JAVA_HOME with Value set to the JDK installation path, for example, D:\Java\jdk1.8.0_45.
- Edit the Path variable and add %JAVA_HOME%\bin to Variable value.
- Create the CLASSPATH variable with Variable value set to .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar.
- Check whether the configurations succeed. Specifically, at the Start menu, enter cmd and press Enter to bring up the command prompt window. Enter java -version and press Enter. If the version information is displayed, as shown in Figure 1, the JDK is successfully installed and environment variables are successfully configured.
- Download Eclipse IDE for Java Developers of the latest version from the Eclipse's official website and install it. Configure the JDK in Eclipse.
- Create a project and select the correct JRE version. For details, see Figure 2.
- Configure and import the SDK JAR package.
- Right-click JRE System Library and choose Build Path > Configure Build Path from the shortcut menu. For details, see Figure 3.
- Click Add External JARs, select the downloaded JAR package obtained in Downloading SDK, and click OK.
Figure 4 Selecting the SDK JAR package
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.