I am trying to add Python functionality to a javaFX application using Jython (with Maven in the IntelliJ IDE). To do this used the following dependency:
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>19.0.2.1</version>
</dependency>
My module-info:
module com.example.application {
requires javafx.controls;
requires javafx.fxml;
requires java.sql;
requires java.desktop;
requires jython;
opens Example.application.main to javafx.fxml;
exports Example.application.main;
}
The problem that I am encountering occured in the aforementioned module-info; when I attempted to run the application, I was given the following error message:
java: java.lang.reflect.InvocationTargetException
Module jython contains package org.w3c.dom.html, module jdk.xml.dom exports package org.w3c.dom.html to jython
I have tried to exclude the part of the jython library that caused the problem by excluding it in the dependency, but this had no effect (I probably did not perform this function in a satisfactory manner due to my illiteracy in Maven).
If anybody here in the Jython community has come across this error before, how did you go about resolving the issue?