Help Center/ MapReduce Service/ Developer Guide (LTS)/ Kafka Development Guide (Normal Mode)/ Environment Preparation/ Configuring and Importing a Sample Project
Updated on 2022-11-18 GMT+08:00
Configuring and Importing a Sample Project
- Obtain the sample project folder kafka-examples in the src directory where the sample code is decompressed. For details, see Obtaining Sample Projects from Huawei Mirrors.
- Copy the all the cluster configuration file obtained in section Preparing an Operating Environment to the kafka-examples\src\main\resources directory of the sample project.
- After installing the IntelliJ IDEA and JDK tools, configure JDK in IntelliJ IDEA.
- Open IntelliJ IDEA and click Configure. Figure 1 Quick Start
- Choose Project Defaults > Project Structure. Figure 2 Configure
- In the displayed Project Structure for New Projects interface, click SDKs. Then click the plus sign (+) and choose JDK. Figure 3 Project Structure for New Projects
- In the displayed Select Home Directory for JDK interface, select the JDK directory, and click OK. Figure 4 Select Home Directory for JDK
- Click OK. Figure 5 Completing the JDK configuration
- Open IntelliJ IDEA and click Configure.
- Import example projects into the IntelliJ IDEA development environment.
- Choose Open.
The dialog box for browsing directories is displayed.
- Select the sample project folder and click OK.
- Choose Open.
- Set the IntelliJ IDEA text file coding format to prevent invalid characters.
- On the IntelliJ IDEA menu bar, choose File > Settings.
The Settings window is displayed.
- Choose Editor > File Encodings in the Project Encoding area and Global Encoding area, set the parameter to UTF-8, click Apply, and then click OK, as shown in Figure 6.
- On the IntelliJ IDEA menu bar, choose File > Settings.
Parent topic: Environment Preparation
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.
