JavaFX not available/not working at runtime for NB modules
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Comienza con el proyecto de reproducción en la ruta vinculada for_nb_classloading y la configuración de la dependencia org-netbeans-libs-javafx. Investiga cómo se exponen las bibliotecas JavaFX en modules/ext cuando las dependencias de los módulos usan provided scope, utilizando el stack trace Toolkit not initialized como punto del fallo. Se considera terminado cuando el módulo ejecuta JavaFX con la configuración de dependencias documentada, o cuando el uso requerido está claramente documentado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Apache NetBeans version
Apache NetBeans 30
What happened
Goal: build a NB module which uses JavaFX for the UI.
Understood solution:
- add a dependency to org-netbeans-libs-javafx in the module pom
- add the needed dependencies for JavaFX modules (controls, fxml, etc.) in the module pom with scope
provided- NB should provide the classes - build the module
- install JavaFX Library for XXX (Linux/Windows/Mac)
- install the module
What works:
The module compile and installs, but when it tries to run JavaFX, it runs into exception
SEVERE [global]
java.lang.IllegalStateException: Toolkit not initialized
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:436)
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:431)
at javafx.application.Platform.runLater(Platform.java:168)
at ste.netbeans.restart.RestartIDEAction.lambda$actionPerformed$2(RestartIDEAction.java:83)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
I would expect the module to pick the libraries in ext, which are available:
[ste userdir] =)o ls -la modules/ext/
total 54204
drwxrwxr-x 2 ste ste 4096 Jul 7 23:14 .
drwxrwxr-x 3 ste ste 4096 Jul 7 23:15 ..
-rw-rw-r-- 1 ste ste 753864 Jul 7 23:14 javafx-base-21.0.9-linux.jar
-rw-rw-r-- 1 ste ste 2585211 Jul 7 23:14 javafx-controls-21.0.9-linux.jar
-rw-rw-r-- 1 ste ste 4697444 Jul 7 23:14 javafx-graphics-21.0.9-linux.jar
-rw-rw-r-- 1 ste ste 1507586 Jul 7 23:14 javafx-media-21.0.9-linux.jar
-rw-rw-r-- 1 ste ste 89705 Jul 7 23:14 javafx-swing-21.0.9-linux.jar
-rw-rw-r-- 1 ste ste 45844181 Jul 7 23:14 javafx-web-21.0.9-linux.jar
It seems instead these libraries are not available unless declared as compile scope.
Language / Project Type / NetBeans Component
No response
How to reproduce
See https://github.com/stefanofornari/nb-ide-restart/tree/ste/test/for_nb_classloading
Did this work correctly in an earlier version?
No / Don't know
Operating System
Linux
JDK
both OpenJDK 21 and Zulu 21.50
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
I could not find any useful and updated documentation at least on how JavaFX IMplementation for XXX is supposed to work and how to use it either to build a JavaFX application or a module using JavaFX
Are you willing to submit a pull request?
No
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 939
- Merge medio
- 5 d 3 h
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/netbeans
-
Contribution welcome kind:feature Platform
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/netbeans#9614 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
kind:bug LSP needs:triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/netbeans#9548 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Editor Java kind:feature needs:triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
The main Options dialog window has buttons with OK on the left instead of on the right on LinuxAbiertokind:bug needs:triage os:linux os:macos Platform UI
Dificultad 1/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Incorrect DTD for wstcref-FilesAbiertokind:bug needs:triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/netbeans
Issues similares
-
backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bcgov/nr-forest-client#2524 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
team:Lumberjack
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
OpenLiberty/open-liberty#35998 ·
Los mantenedores suelen responder en 1 día
-
[BUG] SQS SendMessageBatch accepts more than 10 entries instead of TooManyEntriesInBatchRequestPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
floci-io/floci#5319 · 1 comentario ·
Los mantenedores suelen responder en 1 día