Help Center/ MapReduce Service/ Developer Guide (Normal_3.x)/ Storm Development Guide (Security Mode)/ Running an Application/ Packaging IntelliJ IDEA Code
Updated on 2025-10-23 GMT+08:00
Packaging IntelliJ IDEA Code
Scenario
Export a JAR package using IntelliJ IDEA and specify the name of the JAR package, for example, storm-examples.jar.
Procedure
- If the Storm-JDBC sample needs to run in Windows, replace the configuration file path. Otherwise, skip this step.
- Right-click the jdbc.properties file on the IDEA page, choose Copy Path/Reference > Absolute Path, and copy the path of the jdbc.properties file. Figure 1 Copy the jdbc.properties File Path
- Change the value of proPath in the main() method of SimpleJDBCTopology.java to the path of the jdbc.properties file copied from 1.a. Figure 2 Modify the proPath Path
- Right-click the jdbc.properties file on the IDEA page, choose Copy Path/Reference > Absolute Path, and copy the path of the jdbc.properties file.
- In IntelliJ IDEA, configure the Artifacts information for the project before the JAR package is generated.
- Enter IntelliJ IDEA and choose File > Project Structure.
- On the Project Structure page, select Artifacts, click the plus sign (+), and choose JAR > Empty. Figure 3 Adding Artifacts
- Set the name, type, and output path of the JAR package based on site requirements.
- Choose 'storm-examples' , right-click Put into Output Root, and click Apply. Figure 5 Put into Output Root
- Click OK to complete the configuration.
- Generate the JAR package.
- Enter IntelliJ IDEA and choose Figure 6 Build Artifacts
- In the displayed interface, choose storm-examples:jar > Build to generate the JAR package. Figure 7 Build
- If log similar to the following is displayed in event logs, the JAR package is successfully generated. Obtain the JAR package from the Output directory configured shown in Figure 4.
14:37 Compilation completed successfully in 25 s 991 ms
- Enter IntelliJ IDEA and choose
Parent topic: Running an Application
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.
