I need to attach a GUI to python application. I've seen tkinter and Qt5, but they make too native GUIs. In fact, using the first one I cannot customize my elements with css, and the second one only support a subset of it. That's why I wonder if I can use a fxml file to create a nice interface.
Then, I followed this link and tried to use jython. In one comment, they said: "you can manually add jfxrt.jar to your module search path if you are using a version of Java where it isn't available." This is my case, but I have no idea about how to do it. I downloaded the jfxrt.jar and I put it in the same python script folder, but the same error occurs when I try jython script.py
:
WARNING: Illegal reflective access by jnr.posix.JavaLibCHelper$ReflectiveAccess (file:/usr/share/java/jnr-posix.jar) to method sun.nio.ch.SelChImpl.getFD()
WARNING: Please consider reporting this to the maintainers of jnr.posix.JavaLibCHelper$ReflectiveAccess
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Traceback (most recent call last):
File "./test.py", line 10, in <module>
from javafx.application import Application
ImportError: No module named javafx
What I executed is the code in the page previously linked. What can I do to solve this import error?