введите здесь описание изображения
это мой build.gradle:
Код: Выделить всё
buildscript {
ext.gradle_version = "7.1.1"
}
plugins {
id "java"
id "application"
id "org.javamodularity.moduleplugin" version "1.8.12"
id "org.openjfx.javafxplugin" version "0.0.13"
id "org.beryx.jlink" version "2.25.0"
}
group "com.webkriativa.mypackage"
version "0.5"
var simpleitkVersion = "2.3.1"
var simpleitkLibPath = "libs/SimpleITK-" + simpleitkVersion
var simpleitkJarPath = simpleitkLibPath + "/simpleitk-" + simpleitkVersion + ".jar"
var lwjglNativesPath = "libs/lwjgl";
var dcm4chePath = "libs/dcm4che-5.31.2";
var openCVNativesWindowsPath = "libs/dcm4che-5.31.2/lib/windows-x86-64"
project.ext.lwjglVersion = "3.3.3"
project.ext.lwjglNatives = "natives-windows"
repositories {
mavenCentral()
maven {
url = uri("https://maven.scijava.org/content/repositories/public/")
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
application {
mainModule = "com.webkriativa.mypackage"
mainClass = "com.webkriativa.mypackage.MRETest"
}
javafx {
version = "17.0.6"
modules = ["javafx.controls", "javafx.fxml", "javafx.graphics"]
}
dependencies {
//a lot of things here
}
jar {
manifest {
attributes "Main-Class" : "com.webkriativa.mypackage.MRETest"
}
duplicatesStrategy = "exclude"
}
tasks.jpackageImage.doLast {
copy {
from("src/main/resources")
into("$buildDir/jpackage/$project.name/src/main/resources")
}
copy {
from simpleitkLibPath
into("$buildDir/jpackage/$project.name/runtime/bin")
include '**/*.dll'
}
copy {
from lwjglNativesPath
into("$buildDir/jpackage/$project.name/runtime/bin")
}
copy {
from dcm4chePath
into("$buildDir/jpackage/$project.name/runtime/bin")
}
copy{
from 'src'
into("$buildDir/jpackage/$project.name")
include 'run-noah.bat'
}
}
jlink{
jpackage {
if (org.gradle.internal.os.OperatingSystem.current().windows) {
installerOptions += ['--win-per-user-install', '--win-menu', '--win-shortcut', '--win-menu-group', '--win-dir-chooser', '--win-console']
}
}
}
run {
jvmArgs = ['-Djava.library.path="' + lwjglNativesPath + ';' + openCVNativesWindowsPath + ';' + simpleitkLibPath + '"', '--add-opens', 'java.desktop/javax.imageio.stream=dcm4che.imageio.opencv',
'--add-opens', 'java.base/java.io=dcm4che.imageio.opencv', '-Dorg.lwjgl.util.Debug=true', '-Dorg.lwjgl.util.DebugLoader=true']
}
Подробнее здесь: https://stackoverflow.com/questions/783 ... table-file
Мобильная версия