# Error trying to run Jabref from windows command line

**URL:** <https://discourse.jabref.org/t/error-trying-to-run-jabref-from-windows-command-line/3530>\
**Category:** Help\
**Created:** [September 5, 2022, 12:23am UTC](https://discourse.jabref.org/t/error-trying-to-run-jabref-from-windows-command-line/3530 "2022-09-05T00:23:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John-Poulos](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/john-poulos/32/1464_2.png) [@John-Poulos](https://discourse.jabref.org/u/John-Poulos)\
**Post date:** [September 5, 2022, 12:23am UTC](https://discourse.jabref.org/t/error-trying-to-run-jabref-from-windows-command-line/3530/1 "2022-09-05T00:23:30Z")

</div>

Hello JabRef Team 🙂  
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](https://devdocs.jabref.org/getting-into-the-code/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 😁  
`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] org.jabref.logic.net.ssl.TrustStoreManager.createTruststoreFileIfNotExist()  
> 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(JabRefPreferences.java:2174) at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.getFilePreferences(JabRefPreferences.java:2189) at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.getFileLinkPreferences(JabRefPreferences.java:1110) at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.getLayoutFormatterPreferences(JabRefPreferences.java:1123) at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.getCustomExportFormats(JabRefPreferences.java:2293)  
> at org.jabref@100.0.0/org.jabref.gui.JabRefMain.applyPreferences(JabRefMain.java:175)  
> at org.jabref@100.0.0/org.jabref.gui.JabRefMain.start(JabRefMain.java:106)  
> at javafx.graphics@18.0.2/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)  
> at javafx.graphics@18.0.2/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)  
> at javafx.graphics@18.0.2/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)  
> at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)  
> at javafx.graphics@18.0.2/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)  
> at javafx.graphics@18.0.2/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)  
> at javafx.graphics@18.0.2/com.sun.glass.ui.win.WinApplication.\_runLoop(Native Method)  
> at javafx.graphics@18.0.2/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)  
> at java.base/java.lang.Thread.run(Thread.java:833)

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](https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings)

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

(edit)  
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.

```auto
C:\Users\John\IdeaProjects\jabref\buildSrc\src\copied\java\org\jabref\logic\journals\JournalAbbreviationLoader.java:45: error: cannot find symbol
                    repository.addCustomAbbreviations(readJournalListFromFile(Path.of(filename)));
                                                                                  ^
  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\JournalAbbreviationRepository.java:89: 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>

```

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [September 5, 2022, 8:03am UTC](https://discourse.jabref.org/t/error-trying-to-run-jabref-from-windows-command-line/3530/2 "2022-09-05T08:03:43Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![John-Poulos](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/john-poulos/32/1464_2.png) [@John-Poulos](https://discourse.jabref.org/u/John-Poulos)\
**Post date:** [September 5, 2022, 12:56pm UTC](https://discourse.jabref.org/t/error-trying-to-run-jabref-from-windows-command-line/3530/3 "2022-09-05T12:56:45Z")

</div>

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 🙂
