0

I'm trying to make an installer from my Gradle + JavaFX project using jpackage but the following error occurs:

Execution failed for task ':jpackageImage'.
> /home/jonander/.gradle/daemon/6.8/null/bin/jpackage does not exist.

This is my module.info:

module Seftic.main {
    requires java.sql;
    requires javafx.base;
    requires javafx.controls;
    requires javafx.fxml;
}

This is my configuration in build.gradle:

plugins {
    id 'java'
    id 'org.beryx.jlink' version '2.24.1'
    id 'org.openjfx.javafxplugin' version '0.0.10'
}

javafx {
    modules = [ 'javafx.controls', 'javafx.fxml','javafx.base' ]
}

What is causing this error, and how can it be fixed?

M. Justin
  • 14,487
  • 7
  • 91
  • 130
  • 2
    The `null` in the path suggests that something went wrong when constructing the path to the binary. What JDK are you running this in? – Joachim Sauer Aug 18 '21 at 22:14

1 Answers1

1

Don't know if anyone found a better solution but, you could set jpackageHome to your JDK install, in your build.gradle:

jlink {
    jpackage {
        jpackageHome = '/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home'
        installerType = 'dmg'
    }
}
VladCo
  • 11
  • 2