How Do I Add a Dependency Package with Customized Codes?
Question
When developing Spark applications, I can add customized dependency packages except for the sample application. How do I use the IDEA to add the dependency package with customized codes to the project?
Answer
- On the IDEA homepage, choose Project Structure page. to go to the
- Click the Libraries tab. On the page that is displayed, click + to add a local dependency package.
Figure 1 Adding the dependency package.
- Click Apply to load the dependency package and click OK.
- Because there is no custom dependency package in the running environment, you also need to add this dependency package when compiling the package, so that the generated JAR file contains the custom dependency package, ensuring that the Spark application can run properly.
- On the Project Structure page, click the Artifacts tab.
- In the pane on the right, click + and choose Library Files to add a dependency package.
Figure 2 Adding library files
- Select the dependency package that you want to add and click OK.
Figure 3 Choosing the library
- Click Apply to load the dependency package and click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.