oracle / graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
https://www.graalvm.org
Other
20.44k stars 1.64k forks source link

CSS url handler not support #4440

Closed Anivie closed 1 year ago

Anivie commented 2 years ago

Then I try to build a tornadofx(javafx) program with gluon plugin, it have this error: Accessing an URL protocol that was not enabled. The URL protocol css is not tested and might not work as expected. It can be enabled by adding the --enable-url-protocols=css option to the native-image command.So i try to add this command to my config,but this error still exist,so I noticed that he warned me when I compiled the native image:Registering the css URL protocol failed. It will not be available at runtime.,so how can i fix it?

Steps to reproduce the issue Clone the tornadofx-demo using gluon gradle plugin run gradlew nativeBuild

More details I think this failure happened because Graal doesn't support URL protocol css, so I sent this issue here. And,could i know that if GraalVM 23 will support it?

    Unable to install CSS url handler, type safe stylesheets might not work
java.net.MalformedURLException: Accessing an URL protocol that was not enabled. The URL protocol css is not tested and might not work as expected. It can be enabled by adding the --enable-url-protocols=css option to the native-image command.
        at com.oracle.svm.core.jdk.JavaNetSubstitutions.unsupported(JavaNetSubstitutions.java:261)
        at com.oracle.svm.core.jdk.JavaNetSubstitutions.getURLStreamHandler(JavaNetSubstitutions.java:239)
        at java.net.URL.getURLStreamHandler(URL.java:81)
        at java.net.URL.<init>(URL.java:680)
        at java.net.URL.<init>(URL.java:569)
        at java.net.URL.<init>(URL.java:516)
        at tornadofx.Stylesheet$Companion.detectAndInstallUrlHandler(CSS.kt:469)
        at tornadofx.Stylesheet$Companion.access$detectAndInstallUrlHandler(CSS.kt:97)
        at tornadofx.Stylesheet.<clinit>(CSS.kt:448)
        at tornadofx.App.<init>(App.kt:73)
        at ink.bluecloud.tfxnative.MainApp.<init>(MainApp.kt:5)
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:803)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
        at java.security.AccessController.doPrivileged(AccessController.java:107)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST_Runnable_run_16403f8d32adb631126daa893e5e80085c5d6325(JNIJavaCallWrappers.java:0)
        at com.sun.glass.ui.win.WinApplication._runLoop(WinApplication.java)
        at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
        at java.lang.Thread.run(Thread.java:833)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:597)
        at com.oracle.svm.core.windows.WindowsJavaThreads.osThreadStartRoutine(WindowsJavaThreads.java:140)
rodrigar-mx commented 2 years ago

Hi @Anivie. I could not find the build.gradle file on the project you shared. Which is the project or subproject you are building and getting this error?