1

Continued JavaFX - ProviderNotFoundException: Provider not found

After solving the problem with exporting the zip file system to the final image, I also ran into one problem from the same area. My JavaFX application uses http, I make a remote request using the POST method. When trying to do this, I ran into the following problem: javax.net.ssl.SSLHandshakeException: Fatal warning received: handshake_failure

I can assume that this problem is from the same area as the previous one. I do not know which module to add to module-info.java to solve this problem. In the previous question, I was prompted about the parameter for jlink --bind-services, which helped solve this problem, but as I was warned, this provoked an increase in the size of the final image due to the fact that a lot of "extra" modules were added.

Therefore, I would like to ask for help in prompting which module exactly needs to be added to module-info.java for http to work correctly?

module-info.java

module com.prototype.catassistant {

    requires javafx.controls;
    requires javafx.fxml;
    requires javafx.web;
    requires jdk.zipfs;

    requires org.controlsfx.controls;
    requires org.jetbrains.annotations;
    requires cfr;
    requires com.google.gson;

    opens com.prototype.catassistant to javafx.fxml;
    exports com.prototype.catassistant;
    exports com.prototype.catassistant.compare;

}

Section with jlink settings from build.gradle

jlink {
    imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip")
    options = [/*'--strip-debug','--bind-services',*/ '--compress', '2', '--no-header-files', '--no-man-pages']
    jpackage {
        def currentOs = OperatingSystem.current()
        def imgType = currentOs.windows ? 'ico' : currentOs.macOsX ? 'icns' : 'png'
        icon = "src/main/resources/java.$imgType"
        if (currentOs.windows) {
            installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut', '--vendor', 'Prototype']
            imageOptions += ['--win-console',/* '--icon', 'src/main/resources/icon.ico'*/]
        }
    }
    launcher {
        name = 'CatAssistant'
    }
}
  • 2
    You are clearly using (or trying to use) https, not http. Depending on the server you're trying to connect to, this _might_ be caused by your jlinked Java not including jdk.crypto.ec and thus not supporting EC in the SSL/TLS handshake; see https://stackoverflow.com/questions/68896945/javax-net-ssl-sslhandshakeexception-happening-when-using-custom-java-runtime-ima and https://stackoverflow.com/questions/63901516/javafx-deployment-failed-to-launch-jvm – dave_thompson_085 Sep 03 '22 at 11:31
  • @dave_thompson_085 Thank! 'requires jdk.crypto.ec' solve the problem. P.S. yes, i am use https not http – The Prototype Sep 03 '22 at 12:19

0 Answers0