Unable to use gradle/gradlew with jabref, what to do?

I was trying to build JabRef (https://www.jabref.org) from source. I downloaded the source code and then unpacked the zipped file in the ~/config/non-packaged/bin directory and ran

./gradlew from within the directory to build it.
The build process failed, resulting in the following message:

 Configure project :
Project : => 'org.jabref' Java module

FAILURE: Build failed with an exception.

* Where:
Build file '/boot/home/config/non-packaged/bin/jabref/build.gradle' line: 14

* What went wrong:
An exception occurred applying plugin request [id: 'org.openjfx.javafxplugin', version: '0.1.0']
> Failed to apply plugin 'org.openjfx.javafxplugin'.
   > Could not create an instance of type org.openjfx.gradle.JavaFXOptions.
      > unknown os.name: Haiku



At that point, further search on this error message sent me to a rabbit hole and it seems I cannot anything till gradle or os checker includes haiku in their list, if I understand correctly.

Is there a solution that I can use?

This question is perhaps more suited to the gradle or JabRef team, but in case you can provide some guidance, that would be great.

1 Like

I think you can ask for help at the haikuports bugtracker: GitHub - haikuports/haikuports: Software ports for the Haiku operating system.

Maybe they can help with fixing Gradle. You can indeed also ask the Gradle developers if they would be interested in adding support for Haiku themselves.

Hello; I could be wrong but as far as I am aware, JavaFX is only supported on Linux, Mac and Windows. I don’t think there is a port of the JavaFX tech to Haiku yet unfortunately.

3 Likes

You could try the binary archive from upstream, at least I was able to import/detect it in NetBeans.

Should read more careful, you already got that, just ignore my post here. :wink:

Commenting out the lines for javafx in build.gradle makes the build succesfull:

/Opslag/wip/jabref-5.12> gradle
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy UP-TO-DATE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE

> Configure project :
Project : => 'org.jabref' Java module

> Task :help

Welcome to Gradle 8.4.

To run a build, run gradle <task> ...

To see a list of available tasks, run gradle tasks

To see more detail about a task, run gradle help --task <task>

To see a list of command-line options, run gradle --help

For more detail on using Gradle, see https://docs.gradle.org/8.4/userguide/command_line_interface.html

For troubleshooting, visit https://help.gradle.org

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

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

For more on this, please refer to https://docs.gradle.org/8.4/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 852ms
3 actionable tasks: 1 executed, 2 up-to-date
/Opslag/wip/jabref-5.12> 

Running gradle install fails however (needs OS support I guess):

/Opslag/wip/jabref-5.12> gradle install
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy UP-TO-DATE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE

> Configure project :
Project : => 'org.jabref' Java module

> Task :generateBstGrammarSource UP-TO-DATE
> Task :generateCitaviSource UP-TO-DATE
> Task :generateSearchGrammarSource UP-TO-DATE
> Task :generateSource UP-TO-DATE
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Error while evaluating property 'javaCompiler' of task ':compileJava'.
   > Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
      > SystemInfo is not supported on this operating system.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

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

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

For more on this, please refer to https://docs.gradle.org/8.4/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 902ms
6 actionable tasks: 1 executed, 5 up-to-date
/Opslag/wip/jabref-5.12> 

EDIT: updated my local gradle package to 8.6, NetBeans to 20, still fails on the unsupported system … :slight_smile:

Thanks @Begasus , it did not work for me, so JabRef is unusable for me with Haikru OS at present.

maybe you can try kbibtex ? but it seem no one port it yet to haiku

1 Like

Need to check on 32bit and default frameworks, but seems possible :slight_smile:

1 Like

I use papis, works with python

python3 -m pip install papis

But JabRef id fantastic
Kbibtex is of course very good.

Wow… Very cool @Begasus you are very fast!!
Big thanks to you :heart_eyes:

2 Likes

If I didn’t knew better… I would suspect @Begasus is one of those newfangled “AI” bots… in this case, trained on porting software to Haiku :stuck_out_tongue:

Edit: well… he IS an “AI” (Ancient Intelligence :stuck_out_tongue:), trained in porting software to Haiku, in the traditional way… by putting LOTS of hours of hard work on learning how to do it!.

Thanks for all your work, patience, and guidance, @Begasus!

2 Likes

Whilst playing around with KDE stuff I created a KDE generic recipe, after a first check in Terminal it’s just filling in the gaps afterwards. :slight_smile:

Err … the first one could be true, not sure about the “I” in there though :stuck_out_tongue:

Hi @arinbasu You can run Jabref Version 3.8.2.jar. I know this version is limited featured compared to the current release, but it may generate interest in people that can overcome the lack of JavaFX. Apart from being JAVA slow, I found JabRef a capable reference manager (I had over 100 000 references) backed by an active user group. The beauty was you could direct edit entries and do what you wanted, unlike paid offerings, so I think it would appeal to any Haiku user doing publishable research (enthusiastic young Uni students with skills to take Haiku next-level :smile:) .

Your post saved me a heap of time, getting to this option which is usable for me.

  1. Install OpenJDK 8 JRE (the java cup icon) using HaikuDepot. Also install openjdk8_default or Haiku shell will not recognise “java” or load anything.
  2. Download JabRef-3.8.2. JabRef-3.8.2 is the last version before JavaFX started being used. From JabRef5.0 is fully JavaFX.
  3. Open Terminal and cd to your download directory, then ~>java -JabRef-3.8.2.jar

I get a warning: “There seems to be a problem with OpenDK the default GTK Look&Feel. Using Metal L&F instead”." This it does, and I don’t like it, but Voila you have a working version of JabRef.

For anyone else without an existing JabRef experience, or a .bib file to test, I used: I selected his zip. Then in Jabref menu select File–>Opendatabase

Thanks to @giahung.1997tn for the trick

Edit: For some reason my install is taking 30 seconds to open a simple linked text file called from a BibTex entry within JabRef. Also linked URLs doesn’t link! By menu -->Tools–> Open Terminal Here I can see it is opening a URL link as a file link, and so it is not processing it correctly. Not surprising given it is on a Unique OS and File System. A real bummer, because that is a key functionality of JabRef. Anyone?? Help!