Skip to content

Latest commit

 

History

History
107 lines (55 loc) · 3.31 KB

DevGuideIntelliJ.md

File metadata and controls

107 lines (55 loc) · 3.31 KB

Setup BEAST-FX in IntelliJ

This is the developer guide to show you how to setup BEAST 2.7.x core packages in IntelliJ.

Core

https://github.com/CompEvol/beast2

https://github.com/CompEvol/BeastFX

Azul JDK 17

BEAST 2.7.x is based on Java 17 (LTS) and GUI is developed from JavaFX. The following link (filters are applied) to lead you to download Azul Zulu builds of OpenJDK with JavaFX:

https://www.azul.com/downloads/?version=java-17-lts&package=jdk-fx

Scroll the page to the bottom to select the correct one according to your operating system and CPU.

IntelliJ

Download/upgrade to the last version of IntelliJ:

https://www.jetbrains.com/idea/download/

Open "beast2" project

Open your beast2 project. If it does not exist, you can follow the tutorial to create it from existing sources. Do not worry about libraries, you can fix them later.

Project Structure

After the project is opened (be patient with IntelliJ loading time), open Project Structure to configure the project.

Here is the final setting you need to achieve:

If you did not have the Zulu 17, then you need to add it, otherwise you can skip the next section.

Add Zulu JDK

Go to SDKs on the left, and add Zulu 17 from the downloaded Azul Zulu builds of OpenJDK with JavaFX. If you are not familiar with this process, you can read the tutorials SDKs.

In the end, you should have Zulu 17 in your SDKs list:

Setup modules

Global libraries

Personally I recommend you to create global libraries, so that they will be available for other projects.

  1. beast2 library

  1. beast2 junit test

  1. BeastFx library

beast2 module

Add or modify the beast2 module to make it same as the configuration below:

Then setup the dependencies:

BeastFx module

Add or modify the BeastFx module to make it same as the configuration below:

Because the test code is in a different folder structure, you need to add the package prefix to make them compile in IntelliJ. Click the "pen" icon, and add "test" to the prefix.

Then setup the dependencies:

Run application in IntelliJ

Create the run configuration for BEAUti: