javac -versionand make sure that the reported version is Java 16 (e.g.,
javac 16). If
javacis not found or a wrong version is reported, check your
PATHenvironment variable, your
JAVA_HOMEenvironment variable or install the most recent JDK.
sudo apt-get install git
choco install git.install -y --params "/GitAndUnixToolsOnPath /WindowsTerminalto a) install git and b) have linux commands such as
grepavailable in your
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.
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.
jabref/build.gradleas a project. It is crucial that Java 16 is used consistently for the JabRef project which includes ensuring the right settings for your project structure, Gradle build, and run configurations.
JabRef.mainmodule. Otherwise, you will get:
java: package com.sun.javafx.scene.control is not visible (package com.sun.javafx.scene.control is declared in module javafx.controls, which does not export it to module org.jabref)
assembleGradle task at least once.
src-gen/main/java/org/jabref/gui/logging/plugins/Log4jPlugins.java). Hint: You can use Ctrl+Shift+N to search for the name
Log4jPlugins. After opening the file, you can use Alt+F1 and then Enter to focus the file in the project explorer. Then press Del and confirm with Enter. -- In case you find two files, delete both files. If the class is not deleted, you will see following error:
Error:(16, 25) java: package org.jabref.search does not exist), you have to delete
src\main\generated\org\jabref\gui\logging\plugins\Log4jPlugins.java. This is independent of having enabled or disabled Annotation Processing (see above at "Enable Annotation Processing").
config/IntelliJ Code Style.xml
./gradlew runto generate all resources and to check if JabRef runs.
org.jabref.gui.JabRefMain(both can be used equivalently)
LocalizationConsistencyTestyou need to add some extra module information: Right-click on the file -> "Run/Debug as JUnit test". Go to the Run/debug configuration created for that file and in the arguments tab under VM-configurations add:
JAVA_HOMEis not correctly set or no JDK 16 is installed is following error message:
./gradlew cleandeletes these old copies. Do not forget to run at least
./gradlew buildafterwards to regenerate the source files.
org.jabref.logic.journals.JournalAbbreviationLoader.loadRepository(JournalAbbreviationLoader.java:30) ~[classes/:?], invalidate caches and restart IntelliJ. Then, Build -> Rebuild Project.
git clean -xdf. This really destroys data
build.gradle, on might get following error:
Entry org/jabref/build/JournalAbbreviationConverter$_convert_closure1$_closure2.class is a duplicate but no duplicate handling strategy has been set.
git clean -xdf, ...).