JavaFX not available/not working at runtime for NB modules
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu với dự án tái hiện tại đường dẫn for_nb_classloading được liên kết và thiết lập dependency org-netbeans-libs-javafx. Điều tra cách các thư viện JavaFX trong modules/ext được cung cấp khi các dependency của module sử dụng provided scope, dùng stack trace Toolkit not initialized làm điểm lỗi. Công việc được xem là hoàn tất khi module chạy được JavaFX với thiết lập dependency đã được tài liệu hóa, hoặc khi cách sử dụng bắt buộc được tài liệu hóa rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 939
- Merge trung bình
- 4 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 24
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/netbeans
-
Contribution welcome kind:feature Platform
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/netbeans#9614 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kind:bug LSP needs:triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/netbeans#9548 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Editor Java kind:feature needs:triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
The main Options dialog window has buttons with OK on the left instead of on the right on LinuxĐang mởkind:bug needs:triage os:linux os:macos Platform UI
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Incorrect DTD for wstcref-FilesĐang mởkind:bug needs:triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/netbeans
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Netcracker/qubership-integration-platform#1046 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
`check_java_version()` fails when Java path contains spaces (Windows / Git Bash, `C:\Program Files`)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Fix Math.ceilDiv wrong result for exact positive divisionsCó thể đã có người làm @pamod-madubashana đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
scala-native/scala-native#5094 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
NullPointerException in blocking command completion callback when the command succeeds (3.52.0)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày