Error trying to run Jabref from windows command line

Hello JabRef Team :slight_smile:
My name is John and I am interested in trying to assist the JabRef project. I followed the instructions (quite good, by the way) at guidelines-for-setting-up-a-local-workspace but end up with an error when trying to run .\gradlew run from my windows command prompt. I get the error below.
I am not able to run JabRef this way. I have followed the instructions, setup up my environment path variables, taking care to ensure JAVA-HOME was correct and removing old entries for a different Java version. Any advice of how to proceed?
I look forward to your reply and I am eager to work on issue #9119 :grin:
`c:\Users\John\IdeaProjects\jabref>.\gradlew run

Configure project :
Project : => ‘org.jabref’ Java module
Task :run
2022-09-04 19:48:29 [JavaFX Application Thread]
INFO: Trust store path: C:\Users\John\AppData\Local\org.jabref\JabRef\ssl\truststore.jks
2022-09-04 19:48:29 [JavaFX Application Thread] org.jabref.gui.JabRefMain.start()
ERROR: Unexpected exception: java.lang.NullPointerException: Cannot invoke “String.isEmpty()” because “originalDirectory” is null at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.determineMainFileDirectory( at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.getFilePreferences( at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.getFileLinkPreferences( at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.getLayoutFormatterPreferences( at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.getCustomExportFormats(
at org.jabref@100.0.0/org.jabref.gui.JabRefMain.applyPreferences(
at org.jabref@100.0.0/org.jabref.gui.JabRefMain.start(
at java.base/
at Method)
at java.base/

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See Command-Line Interface

15 actionable tasks: 2 executed, 13 up-to-date
c:\Users\John\IdeaProjects\jabref> `

Going through IntelliJ, gradle fails to build with the following two errors. I did generate the additional src code using gradlew assemble and confirmed that the src-gen folder generated and was populated with files.

C:\Users\John\IdeaProjects\jabref\buildSrc\src\copied\java\org\jabref\logic\journals\ error: cannot find symbol
  symbol:   method of(java.lang.String)
  location: interface java.nio.file.Path

C:\Users\John\IdeaProjects\jabref\buildSrc\src\copied\java\org\jabref\logic\journals\ error: cannot find symbol
                       .or(() -> Optional.ofNullable(abbreviationToFull.get(journal)).map(fullName -> new Abbreviation(fullName, journal)));
  symbol:   method or(()->Option[...]nal)))
  location: class java.util.Optional<org.jabref.logic.journals.Abbreviation>

@John-Poulos Thanks for your interest. You hit a bug that was fixed last night.
You need to resync/update your fork.

Otherwise as a workaround create a folder called “JabRef” in Your “Documents” user folder.

1 Like

Many thanks, the error seemed to be my misunderstanding of GitHub desktop! I was on my own branch and didn’t realize that it had not updated. I am very glad that it was resolved and was not an issue with my environment! Thank you again :slight_smile:

1 Like