Content Moderation
Content Moderation
- What's New
- Product Bulletin
- Service Overview
- Getting Started
- User Guide
- API Reference
-
SDK Reference
- Introduction to Moderation SDK
- Applying for a Service
- Obtaining Authentication Information
- Preparing the Environment
- Using the SDK (Java)
- Using the Python SDK
- Using the .NET SDK
- Using the Go SDK
-
FAQs
- Service Enabling
-
APIs
- How Do I Use Content Moderation APIs?
- What Should I Do When I Fail to Call a Content Moderation API?
- Can I Directly Upload a Word File for Text Moderation?
- What Are the Constraints on Concurrent API Calls?
- What Can I Do if the Request for Calling an API Times Out?
- How Do I Customize a Detection in Text Moderation?
- Can Content Moderation Traverse and Review the Content in an OBS Folder?
- Error Codes
- Monitoring
- Others
- Price Details
- Glossary
- General Reference
On this page
Show all
Help Center/
Content Moderation/
SDK Reference/
Using the SDK (Java)/
Obtaining and Installing the Java SDK
Copied.
Obtaining and Installing the Java SDK
You are advised to use the Java SDK for Content Moderation by installing dependencies through Apache Maven.
- Download and install Apache Maven on your operating system.
- After installing and configuring Maven, run the mvn -v command. Maven is installed successfully if the following information is displayed.
- Add dependencies to an existing Maven project or use an integrated development environment (IDE) to create a Maven project.
To create a Maven project using IntelliJ IDEA (an example IDE), perform the following steps (skip if you already have a Maven project):
- Start IntelliJ IDEA.
- Choose File > New > project...
- In the displayed New Project dialog box, click Maven and then Next.
- Specify GroupId and ArtifactId, and click Next.
- Specify Project name and Project location, and click Finish.
- Add dependency items to the pom.xml file of the Maven project.
The following is the dependency for Content Moderation SDK 3.0.55:
<dependency> <groupId>com.huaweicloud.sdk</groupId> <artifactId>huaweicloud-sdk-moderation</artifactId> <version>3.0.55</version> </dependency>
The following sample code uses the fastjson dependency (ignore and delete it if it is not required):
<dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.70</version> </dependency>
Parent topic: Using the SDK (Java)
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot