This is the developer guide to show you how to setup BEAST 2.7.x core packages in IntelliJ.
https://github.com/CompEvol/beast2
https://github.com/CompEvol/BeastFX
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.
Download/upgrade to the last version of IntelliJ:
https://www.jetbrains.com/idea/download/
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.
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.
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:
Personally I recommend you to create global libraries, so that they will be available for other projects.
- beast2 library
- beast2 junit test
- BeastFx library
Add or modify the beast2
module to make it same as the configuration below:
Then setup the dependencies:
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:
Create the run configuration for BEAUti: