Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Guidelines for setting up a local workspace
Clone this wiki locally
- Java Development Kit (Download JDK from Oracle - or execute
choco install jdk8when using chocolatey)
An indication that
JAVA_HOME is not correctly set or no JDK is installed is following error message:
compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > java.lang.ExceptionInInitializerError (no error message)
Ensure you have a Java SDK installed
- In the command line (terminal in Linux, cmd in Windows) run
javacis not found, check your PATH environment variable, your JAVA_HOME environment variable or install the most recent SDK
If you do not have a GitHub account, create it at https://github.com.
Get an IDE in place
The community edition should be enough. If not, a developer key for the JabRef project for the full version is available upon request.
You can find a IntelliJ Codestyle configuration file in the folder
Please install EclEmma for code coverage.
In Ubuntu Linux, you can follow one of these guidelines to Install Eclipse:
In Windows download it from www.eclipse.org and run the installer.
Get git in place
- In Debian-based distros:
sudo apt-get install git
- In Windows: Go to http://git-scm.com/download/win download and install it. For more advanced tooling, you may use Git Extensions or SourceTree.
Get the code
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 command line go to a folder you want to place the source code locally (parent folder of
git clone --depth=10 https://github.com/YOUR_USERNAME/jabref.git. The
--depth--10is 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.
Generating additional source codes and getting dependencies using Gradle:
(not required for IntelliJ)
- Go to the jabref folder (the repo you just cloned, if you are following this tutorial, just execute
- Execute the following steps from the git-bash:
- If you use Eclipse: Additionally run
- If you use IntelliJ: No further setup is required
- In rare cases you might encounter problems due to out-dated automatically generated source files. Running
./gradlew cleandeletes these old copies. Do not forget to run at least
./gradlew buildafterwards to regenerate the source files.
./gradlew tasksshows many other runnable tasks.
- Open Eclipse
- To Import your JabRef project go to menu File --> Import
- Choose General --> Existing projects in the workspace and "next"
- For "select root directory", browse until the root folder of your jabref just cloned from your repo (e.g.,
- Click on "Finish" and voilá!
- In Eclipse, right click on the project and choose Refresh workspace and then choose Run as --> Java application (Forget about the existing errors)
- Choose JabRefMain as the main class to be executed
Set-up your IDE (IntelliJ)
See https://youtu.be/FeQpygT0314. This ensures that
src/main/gen is present.
After that steps, please follow these:
- Install the CheckStyle-IDEA plugin, it can be found via plug-in repository (File > Settings > Plugins > Browse repositories).
- Go to File > Settings > Editor > Code Style, choose a code style (or create a new one)
- Click on the settings wheel (next to the scheme chooser), then Import scheme and choose "CheckStyle Configuration". Select the CheckStyle configuration file
config\checkstyle\checkstyle.xml. Click OK and restart IntelliJ.
- Go to File > Settings > Checkstyle and import the above CheckStyle configuration file. Activate it.
Got it running? GREAT! You are ready to lurk the code and contribute to JabRef . In the latter case, please read CONTRIBUTING.md.