TheBoegl / gradle-launch4j

A gradle-plugin to create windows executables with launch4j
Apache License 2.0
298 stars 40 forks source link

classpath property issue #151

Closed albert-haam closed 1 year ago

albert-haam commented 1 year ago

Dear,

I tried to upgrade the gradle-launch4j 3.0.0 from 2.5.4 but it looks like 'classpath' properties does not work for me.

However it works well if i made an EXE via launch4j 3.50.

launch4j {
    headerType="gui"
    outfile = "${MyAppExeName}"
    mainClassName = "${mainClassNameDef}"
    jarTask = project.tasks.bootJar
    icon = "${MyAppIcon}"

    productName = "${MyAppName}"
    classpath=[
            "../config"
    ]
    //JVM options
    variables=[
            "LOG_HOME=../logs"
    ]

    stayAlive=true
    restartOnCrash=false
    //JDK
    downloadUrl="https://jdk.java.net/archive/"
    initialHeapSize=128
    maxHeapSize=256
    jreMinVersion="17"
    bundledJrePath="../jre"
    requires64Bit=true

    //Error message
    messagesStartupError="An error occurred while starting the application."
    messagesJreVersionError="This application requires a Java Runtime Environment(JRE-17.0.2)"
    messagesLauncherError="The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted."
    messagesInstanceAlreadyExists="An application instance is already running."
}

bootJar {
    archiveFileName = "${MyAppJarName}"
    mainClass = "${mainClassNameDef}"
    manifest {
        attributes(
                'Implementation-Title': project.name,
                'Implementation-Version': project.version,
                "Start-Class": "${startClassName}",
                'Specification-Title':project.description,
                'Built-By': System.getProperty('user.name'),
                'Built-Date': '' + buildTime(),
                'Built-JDK': System.getProperty('java.version'),
                'Built-Gradle': gradle.gradleVersion
        )
    }
}
createExe.dependsOn bootJar

Regards,

thc202 commented 1 year ago

This is already being handled as part of #150.

TheBoegl commented 1 year ago

this is fixed in version 3.0.1.

albert-haam commented 1 year ago

Great, thanks for quickly fixing the issue.

It works well !!