Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Configuring and Importing Sample Projects

Updated on 2024-08-12 GMT+08:00
  1. Obtain the sample project folder.

    Obtain the sample project folder kafka-examples in the src directory where the sample code is decompressed. For details, see Obtaining the MRS Application Development Sample Project.

  2. Copy the all the cluster configuration file obtained in section Preparing the Configuration Files for Connecting to the Cluster to the kafka-examples\src\main\resources directory of the sample project.
  3. After installing the IntelliJ IDEA and JDK tools, configure JDK in IntelliJ IDEA.

    1. Open IntelliJ IDEA and click Configure.
      Figure 1 Quick Start
    2. Choose Project Defaults > Project Structure.
      Figure 2 Configure

    3. 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
    4. In the displayed Select Home Directory for JDK interface, select the JDK directory, and click OK.
      Figure 4 Select Home Directory for JDK
    5. Click OK.
      Figure 5 Completing the JDK configuration

  4. Import the sample project to the IntelliJ IDEA development environment.

    1. Start IntelliJ IDEA and choose Open.

      The Browse Folder dialog box is displayed.

    2. Select a sample project folder, and click OK.
    3. After the import is complete, check that the imported sample projects are displayed on the IDEA home page.
    4. Right-click pom.xml and choose Add as Maven Project from the shortcut menu to add the project as a Maven project. If the "pom.xml" icon is displayed as , go to the next step.

  5. Set the Maven version used by the project.

    1. Choose File > Settings... from the main menu of IntelliJ IDEA.
      Figure 6 Settings
    2. Choose Build, Execution, Deployment > Maven and set Maven home directory to the Maven version installed on the local PC.
      Set User settings file and Local repository as you need, and click Apply > OK.
      Figure 7 Selecting the local Maven installation directory

  6. Set the IntelliJ IDEA text file coding format to prevent garbled characters.

    1. On the IntelliJ IDEA menu bar, choose File > Settings.

      The Settings window is displayed.

    2. In the left navigation pane, choose Editor > File Encodings. In the Project Encoding and Global Encoding areas, set the parameter to UTF-8. Click Apply and OK, as shown in Figure 8.
    Figure 8 Setting the IntelliJ IDEA encoding format

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback