Ahoj @Freso,
what about uploading a package java-openjfx-no-webkit
, with provides=("java-openjfx=${pkgver%%.*}")
and an adapted $pkgdesc
saying "without WebKit"?, so that we at least have a working java-openjfx
available?
Git Clone URL: | https://aur.archlinux.org/java-openjfx.git (read-only, click to copy) |
---|---|
Package Base: | java-openjfx |
Description: | Java OpenJFX client application platform (open-source implementation of JavaFX) - latest version |
Upstream URL: | https://wiki.openjdk.java.net/display/OpenJFX/Main |
Keywords: | javafx openjfx |
Licenses: | GPL-2.0-only WITH Classpath-exception-2.0 |
Submitter: | freswa |
Maintainer: | patlefort |
Last Packager: | patlefort |
Votes: | 12 |
Popularity: | 0.83 |
First Submitted: | 2023-10-08 20:20 (UTC) |
Last Updated: | 2025-09-11 16:49 (UTC) |
Ahoj @Freso,
what about uploading a package java-openjfx-no-webkit
, with provides=("java-openjfx=${pkgver%%.*}")
and an adapted $pkgdesc
saying "without WebKit"?, so that we at least have a working java-openjfx
available?
@dreieck - you were close. Had to add an additional linker fix...
_FIXWERROR="-Wno-error=incompatible-pointer-types"
CFLAGS+=" ${_FIXWERROR}"
CXXFLAGS+=" ${_FIXWERROR}"
export CFLAGS
export CXXFLAGS
# Suppress errors with lld >= 17 due to undefined symbols.
_FIXLDERROR="-Wl,--undefined-version"
LDFLAGS+=" ${_FIXLDERROR}"
export LDFLAGS
@Freso - add the build() fix offered by @dreieck below. Seems to be working.
Can you add java22-openjfx=${pkgver}
to the provides
array, so that the conflict with java-openjfx-bin
can be resolved correctly?
Regards!
Please add to build()
_FIXWERROR="-Wno-error=incompatible-pointer-types"
CFLAGS+=" ${_FIXWERROR}"
CXXFLAGS+=" ${_FIXWERROR}"
export CFLAGS
export CXXFLAGS
(or similar),
otherwise build fails with GCC 14.x with
/var/cache/makepkg/build/java-openjfx/src/jfx22u-22.0.1-7/modules/javafx.graphics/src/main/native-font/freetype.c: In function ‘checkSize’:
/var/cache/makepkg/build/java-openjfx/src/jfx22u-22.0.1-7/modules/javafx.graphics/src/main/native-font/freetype.c:523:33: error: initialization of ‘jbyte *’ {aka ‘signed char *’} from incompatible pointer type ‘jfloat *’ {aka ‘float *’} [-Wincompatible-pointer-types]
523 | jbyte* newPointCoords = (jfloat*)realloc(info->pointCoords, info->lenCoords * sizeof(jfloat));
| ^
/var/cache/makepkg/build/java-openjfx/src/jfx22u-22.0.1-7/modules/javafx.graphics/src/main/native-font/freetype.c:525:27: error: assignment to ‘jfloat *’ {aka ‘float *’} from incompatible pointer type ‘jbyte *’ {aka ‘signed char *’} [-Wincompatible-pointer-types]
525 | info->pointCoords = newPointCoords;
| ^
> Task :graphics:ccLinuxFontFreetype FAILED
FAILURE: Build failed with an exception.
Regards and thanks for maintaining!
@aubin Just use the java21-openjfx package?
For everyone else, disabling the building of WebKit seems to unbreak the build (for me at least). I’m not sure how essential the WebKit parts are to JavaFX overall, so a bit wary about changing this part of the PKGBUILD here. For anyone who wants to try it out, you can grab the package from this branch: https://gitlab.archlinux.org/freso/java-openjfx/-/tree/java-openjfx-no-webkit
java21-openjfx is LTS, it's not out-of-date. Or maybe I 'm missing something, How can I stay with LTS Java ?
This package doesn't seem to work?
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class HelloFX extends Application {
@Override
public void start(Stage stage) {
String javaVersion = System.getProperty("java.version");
String javafxVersion = System.getProperty("javafx.version");
Label l = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + ".");
Scene scene = new Scene(new StackPane(l), 640, 480);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}
$ javac --module-path=/usr/lib/jvm/java-22-openjdk/lib --add-modules=javafx.controls HelloFX.java
$ java --module-path=/usr/lib/jvm/java-22-openjdk/lib --add-modules=javafx.controls HelloFX
Error occurred during initialization of boot layer
java.lang.LayerInstantiationException: Package jdk.internal.jimage.decompressor in both module java.base and module jrt.fs
This exact error given here: https://stackoverflow.com/questions/42986287/runtimeexception-package-jdk-internal-jimage-decompressor-in-module-jrt-fs-and
Perhaps it just shouldn't be installed into the jvm folder?
Pinned Comments
patlefort commented on 2025-05-03 18:24 (UTC) (edited on 2025-09-05 11:14 (UTC) by patlefort)
I have modified install locations: