You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried this with open jdk 16/17 , also with amazon carrot jdk 16/17 . So the final run I had that produced that error above is on open jdk 16.
Operating System: Windows 11 .
Gradle script :
plugins {
// This is an application.
id 'application'// Since it's an application, you might want to distribute an executable/installer.
id 'org.beryx.jlink' version '2.25.0'
}
group('io.github.kinsleykajiva')
version('0.0.1')
def currentOs =org.gradle.internal.os.OperatingSystem.current()
repositories {
// Maven Central is used to resolve dependencies.
mavenCentral()
}
dependencies {
// Testing is done with the JUnit 5 Testing framework.
testImplementation platform('org.junit:junit-bom:5.7.1')
testImplementation 'org.junit.jupiter:junit-jupiter'// Since Gradle 6.6, we have to grab javafx dependencies straight from the source.// Because JavaFX has specific binaries for each development platform, we need to// use the correct ones for our platform.def platform = (currentOs.windows ?'win': currentOs.linux ?'linux': currentOs.macOsX ?'mac':'')
implementation "org.openjfx:javafx-base:16:${platform}"
implementation "org.openjfx:javafx-controls:16:${platform}"
implementation "org.openjfx:javafx-graphics:16:${platform}"
implementation "org.openjfx:javafx-fxml:16:${platform}"
implementation 'org.controlsfx:controlsfx:11.1.1'
implementation 'org.json:json:20220320'/// implementation 'org.mapdb:mapdb:3.0.8'/// implementation 'org.eclipse.collections:eclipse-collections:11.0.0'/// implementation 'com.google.code.gson:gson:2.9.0'
implementation 'com.jfoenix:jfoenix:9.0.10'// compileOnly 'org.projectlombok:lombok:1.18.24'// implementation 'com.google.code.findbugs:jsr305:3.0.2'// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50"// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50"// define a BOM and its version// implementation("com.squareup.okhttp3:okhttp:4.9.3")// implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'// implementation 'com.konghq:unirest-java:3.11.09:standalone'// implementation enforcedPlatform('com.fasterxml.jackson:jackson-virtual-platform:2.8.9')
}
application {
// Define the main module and class for the application here.// When you change your module name or class name, change it here as well!
mainModule.set('template')
// mainClass.set('template.Main')
mainClass.set('template.Main')
}
// Ensures modules get put on the path correctly
java {
modularity.inferModulePath.set(true)
}
// Java 16 is a must!// ...or set your own preferred java version here.
compileJava {
options.release.set(16)
}
java {
toolchain {
languageVersion =JavaLanguageVersion.of(16)
}
}
// Unit Testingimportorg.gradle.api.internal.tasks.testing.results.DefaultTestResult// Pretty-prints the results of the testing.
tasks.withType(Test) {
useJUnitPlatform()
testLogging {
def totalTestTime =0
afterTest { desc, DefaultTestResultresult->
totalTestTime += result.endTime - result.startTime
}
afterSuite { desc, DefaultTestResultresult->if (!desc.parent) { // will match the outermost suitedef passFailSkip ="${result.successfulTestCount} passed, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped"def output ="Test Suite Results: ${result.resultType} (${result.testCount} tests, ${passFailSkip}) in ${totalTestTime} ms."def startItem ='| ', endItem =' |'def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n'+ ('-'* repeatLength) +'\n'+ startItem + output + endItem +'\n'+ ('-'* repeatLength) +'\n')
if (("${result.resultType}"!="SUCCESS")) {
System.exit(0)
}
}
}
}
}
// Packaging// More information on the jlink plugin: https://badass-jlink-plugin.beryx.org/releases/2.24.0/
jlink {
def appName ='System'def appDescription ='system'// Name your icons according to the icon type, such as:// (Windows) appIcon_ico.ico// (Linux) appIcon_png.png// (MacOS) appIcon_icns.icns//// Then, put your icons in the same directory and set the iconPath below as follows:// path/to/appIcondef iconPath ='path/to/appIcon'// Makes sure JavaFX gets added
addExtraDependencies("javafx")
// Removes all the unnecessary debugging information from the created executable/installer.
options.addAll('--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages')
launcher {
name = appName
noConsole =true
}
jpackage {
installerOptions +='--verbose'// cross-platform options
jvmArgs += ['-XX:+CreateCoredumpOnCrash']
installerOptions += [
'--description', appDescription,
'--app-version', project.version
]
// platform-specific optionsif (currentOs.windows) {
installerType ="msi"
icon ="${iconPath}_ico.ico"
icon ="src/main/java/template/icon1.ico"
installerOptions += [
'--win-dir-chooser',
'--win-shortcut',
]
} elseif (currentOs.linux) {
installerType ="deb"
icon ="${iconPath}_png.png"
installerOptions += [
'--linux-shortcut'
]
} elseif (currentOs.macOsX) {
installerType ="pkg"
icon ="${iconPath}_icns.icns"
}
}
}
additional information:
IDE : Intelli j idea ultimate
The text was updated successfully, but these errors were encountered:
Hi , I have a problem when executing jpackage command, below is the exception that I got when performing gradle package:
Here is the error :
I have tried this with open jdk 16/17 , also with amazon carrot jdk 16/17 . So the final run I had that produced that error above is on open jdk 16.
Operating System: Windows 11 .
Gradle script :
additional information:
IDE : Intelli j idea ultimate
The text was updated successfully, but these errors were encountered: