JonAnderAsua
JonAnderAsua

Reputation: 11

What is causing this "jpackage does not exist" error?

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?

Upvotes: 1

Views: 1069

Answers (1)

VladCo
VladCo

Reputation: 11

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'
    }
}

Upvotes: 1

Related Questions