Как правильно собрать javafx 11 приложение, чтобы оно нормально запусталось у пользователя на компе без танцев с бубном(под windows 7,10)?
Или что пользователю нужно установить еще кроме java 11 ? Очень запутался в данном вопросе, ответ так и не нашел. C 8-ой джавой всё было проще, установил и всё работает.
Пользовался данным руководством https://openjfx.io/openjfx-docs/#modular , использую gradle.
plugins {
// id 'java'
id 'application'
id 'org.jetbrains.kotlin.jvm' version '1.3.50'
id 'com.github.johnrengelman.shadow' version '5.1.0'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.beryx.jlink' version '2.12.0'
}
group 'ru.test'
version '0.1'
sourceCompatibility = 1.8
mainClassName = 'ru.test.start.MyAppKt'
repositories {
mavenCentral()
jcenter()
maven { url 'https://dl.bintray.com/konrad-kaminski/maven' }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testCompile group: 'junit', name: 'junit', version: '4.12'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
// implementation group: 'org.jsoup', name: 'jsoup', version: '1.12.1'
implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
implementation 'no.tornado:tornadofx:1.7.19'
implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-javafx', version: '1.3.0-M2'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.10.0.pr1'
implementation 'org.projectlombok:lombok:1.16.20'
implementation 'org.brunocvcunha.inutils4j:inutils4j:0.6'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.8'
implementation 'org.apache.httpcomponents:httpclient:4.5.9'
implementation 'org.apache.httpcomponents:httpmime:4.5.9'
// implementation 'org.apache.httpcomponents:httpcore:4.5.9'
implementation 'commons-codec:commons-codec:1.9'
implementation 'org.apache.commons:commons-lang3:3.1'
implementation 'org.bytedeco:javacv:1.3.1'
implementation "org.openjfx:javafx-controls:$javafx.version:win"
implementation "org.openjfx:javafx-controls:$javafx.version:linux"
implementation "org.openjfx:javafx-controls:$javafx.version:mac"
implementation "org.openjfx:javafx-fxml:$javafx.version:win"
implementation "org.openjfx:javafx-fxml:$javafx.version:linux"
implementation "org.openjfx:javafx-fxml:$javafx.version:mac"
implementation "org.openjfx:javafx-graphics:$javafx.version:win"
implementation "org.openjfx:javafx-graphics:$javafx.version:linux"
implementation "org.openjfx:javafx-graphics:$javafx.version:mac"
}
javafx {
version = "11"
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.graphics' ]
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
shadowJar{
archiveName = "TestProg-${version}.6.${extension}"
// manifest {
// attributes 'Main-Class': 'ru.test.TestHereKt'
// }
}
jlink {
launcher {
name = 'ru.test.start.MyAppKt'
}
}
jar {
archiveName = "TestProg-${version}.6.${extension}"
manifest {
attributes 'Main-Class': 'ru.test.start.MyAppKt'
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
Java 11
?oracle
- это теперь отдельный модуль. ну так возьмите и встройте, в чем проблема?dependencies
. Если не мобильное приложение, скачайте модуль и внедрите в вашу либу.