Skip to content

Running Locally

isabellelucy edited this page Oct 15, 2020 · 4 revisions

This guide explains how to set up your environment for development of JabRef. It includes information about prerequisites, configuring your IDE, and running JabRef locally to verify your setup.

Prerequisites

This section list the prerequisites you need to get started to develop JabRef. After this section, you are ready to get the code.

Java Development Kit 14

A working Java (Develoment Kit) 14 installation with Java FX support is required. In the command line (terminal in Linux, cmd in Windows) run javac -version and make sure that the reported version is Java 14 (e.g javac 14). If javac is not found or a wrong version is reported, check your PATH environment variable, your JAVA_HOME environment variable or install the most recent JDK.

JavaFX is not part of the default JDK any more, it needs to be installed separately if not using a special JDK. We recommend to setup the full Liberica JDK including JavaFX. You can get it from https://bell-sw.com/pages/downloads/?version=java-15&package=jdk-full. On Windows, you can execute choco install libericajdkfull (requires installation of chocolatey - a package manager for Windows). (Liberica JDK 15 does not include the Java compiler properly any more)

Download and install the JDK from https://jdk.java.net/. Afterwards, download the "jmods" JavaFX 15 zip archive from https://gluonhq.com/products/javafx/ and put the .jmod files into C:\Program Files\OpenJDK\jdk-15\jmods.

GitHub Account

If you do not yet have a GitHub account, please create one. Proposals for account names:

Git

It is strongly recommend that you have git installed.

  • In Debian-based distros: sudo apt-get install git
  • In Windows: Download the installer and install it. Using chocolatey, you can run choco install git.install -y --params "/GitAndUnixToolsOnPath /WindowsTerminal to a) install git and b) have linux commands such as grep available in your PATH.
  • official installation instructions

IDE

We suggest IntelliJ IDEA. For advanced users, Eclipse (2020-09 or newer) is also possible.

IntelliJ

We recommend to install IntelliJ IDEA using JetBrains Toolbox App, because IDE updates are automatically installed.

Ecipse

On Ubuntu Linux, you can follow the documentation from the Ubuntu Community or the step-by-step guideline from Krizna to install Eclipse. On Windows, download it from www.eclipse.org and run the installer. Eclipse JEE 2020-09 or newer is required. For Eclipse 2020-09 you need to install Java 15 Support.

Get the code

This section explains how you get the JabRef code onto your machine in a form allowing you to make contributions.

  • Fork JabRef into your GitHub account
  • Log into your GitHub account
  • Go to https://github.com/JabRef/jabref
  • Create a fork by clicking at fork button on the right top corner
  • A fork repository will be created under your account https://github.com/YOUR\_USERNAME/jabref.
  • Clone your forked repository on your local machine
  • In a command line, navigate to the folder where you want to place the source code (parent folder of jabref/). To prevent issues along the way, it is strongly recommend to choose a path that does not contain any special (non-ASCII or whitespace) characters.
  • Run git clone --depth=10 https://github.com/YOUR_USERNAME/jabref.git. The --depth--10 is used to limit the download to ~20 MB instead of downloading the complete history (~800 MB). If you want to dig in our commit history, feel free to download everything.
  • Go to the newly created jabref folder: cd jabref
  • Generate additional source code: ./gradlew assemble
  • Start JabRef: ./gradlew run
  • The JabRef's GUI should now start up.