Home javafx How to collect JavaFX 11 Application?

How to collect JavaFX 11 Application?




How to collect JavaFX 11 app, so that it normally run the user on a computer without tambourine (under Windows 7.10)?

or that the user needs to install even except Java 11?
Very confused in this question, I did not find the answer. With the 8th java everything was easier, installed and everything works.

enjoyed this guide https://openjfx.io/openjfx-docs/#moduularI use GRADLE.

plugins {
// ID 'Java'
  ID 'Application'
  ID 'org.jetbrains.kotlin.jvm' version '1.3.50'
  ID 'com.github.johnrengelman.Shadow' Version '5.1.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']
  kotlinoptions.jvmtarget = "1.8"
  kotlinoptions.jvmtarget = "1.8"
shadowjar {
  Archivename = "Testprog - $ {version} .6. $ {extension}"
// manifest {
// attributes 'main-class': 'ru.test.testherekt'
  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)}

Answer 1

  1. installed JDK-12.0.1 and configured the Java_Home environment variable to this folder.

  2. In accordance with the guide https://openjfx.io/openjfx-docs / # install-javafx
    Downloaded JavaFX Windows SDK v.12.0.1 (OpenJFX-12.0.1_windows-x64_bin-sdk.zip) from the site https : //gluonhq.com/products/javafx/ and unpacked it in the appropriate folder.

  3. Checked the Instructions for the Assembly of the NetBean Project (Gradle Project) for NetBeans 11.1 and Intellij Idea Community 2019.2. There were no problems, with the exception of one nuance: For IDEA, you need to correct the MainApp.java file (specify the full path to resource files:

    parent root = xmlloader.load (getClass (). GetResource ("/ ORG / OpenJFX / SCENE.FXML"));
    Scene.getSteSheets (). Add (getClass (). GetResource ("/ ORG / OpenJFX / STYES.CSS"). ToexternalForm ());

    Otherwise (if the path is not specified) IDEA issues an error message. For NetBeans this moment is not critical.

  4. To build a modular JavaFX application Additionally, you need to download JavaFX Windows JMODS (OpenJFX-12.0.1_Windows-x64_bin-jmods.zip) and unpack to the local folder. Further, everything according to the instructions.

Answer 2

For correct operation of JavaFX 11 version you need:

  1. Download JavaFX 11 versions with official site.
  1. Unpack the archive to any folder (I did it in the IDE folder )

  2. in IDE click file – & gt; Project Structure – & gt; Libraries

  3. Click New Project Library

  4. Insert the path to the lib folder from the archive

  5. Activate this library to your project and everything will work.

p.s. I did everything on Intellij Idea, perhaps you will have a little different ways to add. But the meaning will be exactly the same. I earned!

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions