Compiling and Running Applications
Scenario
Run applications in a Windows development environment after application code is developed. If the local and cluster service planes can communicate with each other, you can perform the commissioning on the local host.
- If the IBM JDK is used in the Windows environment, applications cannot be directly run in the Windows environment.
- You need to set the mapping between the host names and IP addresses of the access nodes in the hosts file on the local host where the sample code is run. The host names and IP addresses must be mapped one by one.
Procedure
- Click Reimport All Maven Projects in the Maven window on the right of the IDEA to import the Maven project dependency.
Figure 1 reimport projects
- Compile and run the application.
Modify the IP address, port number, login username, and password of the IoTDBServer node that matches the code.
- Use either of the following two methods:
- Method 1
Choose Maven > Sample project name > Lifecycle > clean and double-click clean to run the clean command of Maven.
Choose Maven > Sample project name > Lifecycle > compile and double-click compile to run the compile command of Maven.
Figure 2 Maven tools clean and compile
- Method 2
Go to the directory where the pom.xml file is located in the Terminal window in the lower part of the IDEA, and run the mvn clean compile command to compile the pom.xml file.
Figure 3 Enter mvn clean compile in the IDEA Terminal text box.
After the compilation is complete, the message "BUILD SUCCESS" is displayed.
Figure 4 Compilation completed
- Method 1
- Run the application.
Right-click the JDBCExample.java file and choose Run 'JDBCExample.main() from the shortcut menu.
Figure 5 Running the application
- Use either of the following two methods:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot