DBeaver Documentation

DOWNLOAD pdf

Develop in IDEA

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. Open the dbeaver-common folder in the console and run mvn clean install.
  7. 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.
  8. Launch IntelliJ IDEA and open the project in the folder. It should contain all launch configurations.
  9. Before compiling, you will need to build the parser grammar files. To do this, you will need to build DBeaver using Maven. Open the Terminal and execute mvn clean install in the dbeaver folder.
  10. For DBeaver, everything is set up and ready. Press CTRL+F9 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.

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.