Skip to content

Develop in IDEA

dbeaver-devops edited this page Jun 6, 2025 · 39 revisions

Table of contents

Overview

DBeaver is built on the Eclipse Platform, making the Eclipse IDE a logical choice for its development. However, many developers prefer the IntelliJ IDEA.

In this guide, we aim to demonstrate how to open the DBeaver project in IDEA, write and compile code, and, most importantly, run and debug the application, leveraging the excellent Java debugger available in IDEA.

Instructions

Opening the project and understanding its module structure in IDEA is relatively straightforward. The complexity arises when attempting to run or debug the project, as this process requires an Eclipse runtime workspace, a feature exclusive to the Eclipse IDE that IntelliJ IDEA does not support.

Opening DBeaver in IDEA

  1. Create a folder where you will clone DBeaver repositories.

    Note: all repositories must be located in the same folder. For example, name it dbeaver-ce.

  2. Navigate to the created folder using the command: cd dbeaver-ce.
  3. Clone the DBeaver repository with: git clone https://github.com/dbeaver/dbeaver.git.
  4. Clone the IDEA generator with: git clone https://github.com/dbeaver/idea-rcp-launch-config-generator.git.
  5. Clone the common components with: git clone https://github.com/dbeaver/dbeaver-common.git.

    Tip: Optionally, for documentation purposes, clone the WIKI repository with: git clone https://github.com/dbeaver/dbeaver.wiki.git (skip this step if you do not need the WIKI).

  6. Clone the LibSQL JDBC driver with: git clone https://github.com/dbeaver/dbeaver-jdbc-libsql.git.
  7. Clone the DBeaver osgi common repository with: git clone https://github.com/dbeaver/dbeaver-osgi-common.
  8. (Optional) Clone the Cloudbeaver repository with git clone https://github.com/dbeaver/cloudbeaver.git
  9. Open the dbeaver/product/aggregate folder in the console and run mvn clean package. Besides product build this will trigger Maven tools which generate dynamic source code.
  10. Execute the generate_workspace script in either the DBeaver or CloudBeaver repository, depending on the workspace you need. Once dependencies are downloaded and IDEA configurations are created, the dbeaver-workspace folder will appear. The IDEA configuration, by default, will be generated in dbeaver-workspace/dbeaver-ce or dbeaver-workspace/cloudbeaver-ce, which can be opened in IntelliJ IDEA.
  11. Launch IntelliJ IDEA and open the project in the folder. It should contain all launch configurations.
  12. If you see a popup about importing Maven projects, press Skip. Otherwise, IDEA might add all existing modules as Maven projects, breaking the project build.
  13. For DBeaver, everything is set up and ready. Press CTRL+F9 (or Rebuild project) and wait. CloudBeaver requires the following additional steps to launch properly

Additional steps for Cloudbeaver

  1. To launch CloudBeaver, we first need to execute the build.sh or build.bat script in cloudbeaver/deploy.
  2. After the script execution cloudbeaver folder will appear. Create the opt folder in the root directory and copy it there.

Final project structure for DBeaver workspace

The final project structure for the DBeaver workspace should look like this:

Configure code style

  1. Install the CheckStyle plugin.
  2. Use the configuration file dbeaver-common/.github/dbeaver-checkstyle-config.xml to set up the CheckStyle plugin.
  3. Import the CheckStyle plugin configuration file into the Code style scheme.

Troubleshooting

If you encounter problems, do not hesitate to double-check your configuration and try again. If you're still experiencing issues, feel free to ask for help at tickets.

DBeaver Desktop Documentation

General User Guide

Database Management

DBeaver PRO

Databases support

Customizing DBeaver

Troubleshooting

Admin Guide

License management

Tutorials

Development

Clone this wiki locally