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.
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.
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 …
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
Edit: well… he IS an “AI” (Ancient Intelligence ), 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!
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 ) .
Your post saved me a heap of time, getting to this option which is usable for me.
Install OpenJDK 8 JRE (the java cup icon) using HaikuDepot. Also install openjdk8_default or Haiku shell will not recognise “java” or load anything.
Download JabRef-3.8.2. JabRef-3.8.2 is the last version before JavaFX started being used. From JabRef5.0 is fully JavaFX.
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
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!