beryx / badass-jlink-plugin

Create a custom runtime image of your modular application
https://badass-jlink-plugin.beryx.org
Apache License 2.0
383 stars 27 forks source link

Problem to build with non modulars app and javafx #144

Closed firm1 closed 4 years ago

firm1 commented 4 years ago

Hi,

I have a problem with jlink plugin. Can you help me to find a solution ?

I try to build my app with javafx.

This is my build.gradle


plugins {
    id "java"
    id "application"
    id "jacoco"
    id "com.github.kt3k.coveralls" version "2.6.3"
    id "org.openjfx.javafxplugin" version "0.0.8"
    id 'org.beryx.jlink' version '2.21.0'
}

apply plugin : "java"

repositories {
    mavenLocal()
    mavenCentral()
}

targetCompatibility = "11"
sourceCompatibility = "11"

group 'com.zds.zw'

wrapper {
    gradleVersion = '6.5'
}

application {
    mainClassName = "com.zds.zw.MainApp"
}

compileJava.options.encoding = 'UTF-8'

// Configures plugin
javafx {
    version = '11'
    modules = ['javafx.controls', 'javafx.fxml', 'javafx.web']
}

// set jpackage installerType based on OS
def os = org.gradle.internal.os.OperatingSystem.current()
def jPkgInstallerType = ''
if (os.isLinux()) {
    jPkgInstallerType = 'deb'
} else if (os.isMacOsX()) {
    jPkgInstallerType = 'pkg'
} else if (os.isWindows()) {
    jPkgInstallerType = 'msi'
}

print(jPkgInstallerType)

jlink {
    options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
    imageZip = project.file("${buildDir}/distributions/zest-writer-${javafx.platform.classifier}.zip")

    launcher {
        name = 'zestwriter'
    }

    forceMerge 'javafx', 'log4j-api', 'jackson'

    jpackage {
        outputDir = "installer"
        imageName = 'zestwriter'
        skipInstaller = false
        installerName = 'zestwriter'
        installerType = "${jPkgInstallerType}"
    }
}

dependencies {
    testImplementation 'junit:junit:4.13-rc-2'

    implementation (group: 'de.julielab', name: 'aliasi-lingpipe', version: '4.1.2-JL1.0') {
        exclude group: 'org.slf4j', module: 'slf4j-api'
    }
    implementation group: 'org.jsoup', name: 'jsoup', version: '1.13.1'
    // jackson
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.11.1'

    // logging
    implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: "${log4jVersion}"
    implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: "${log4jVersion}"
    implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "${log4jVersion}"

    // icons
    implementation group: 'de.jensd', name: 'fontawesomefx-commons', version: "${faVersion}"
    implementation group: 'de.jensd', name: 'fontawesomefx-commons', version: "${faVersion}"
    implementation group: 'de.jensd', name: 'fontawesomefx-materialdesignfont', version: "2.0.26-${faVersion}"

    // utils
    implementation group: 'org.zeroturnaround', name: 'zt-zip', version: '1.14'
    implementation group: 'org.fxmisc.wellbehaved', name: 'wellbehavedfx', version: '0.3.3'
    implementation group: 'org.controlsfx', name: 'controlsfx', version: '11.0.2'
    implementation group: 'commons-io', name: 'commons-io', version: '2.7'
    implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'

    // graal vm
    implementation group: 'org.graalvm.sdk', name: 'graal-sdk', version: "${graalVersion}"
    implementation group: 'org.graalvm.js', name: 'js', version: "${graalVersion}"
    implementation group: 'org.graalvm.js', name: 'js-scriptengine', version: "${graalVersion}"
    implementation group: 'org.graalvm.tools', name: 'chromeinspector', version: "${graalVersion}"
}

My module-info.java

open module zestwriter {
    requires java.base;
    requires javafx.controls;
    requires javafx.fxml;
    requires javafx.web;
    requires com.fasterxml.jackson.databind;
    requires de.jensd.fx.glyphs.materialdesignicons;
    requires wellbehavedfx;
    requires de.jensd.fx.glyphs.commons;
    requires org.apache.commons.io;
    requires zt.zip;
    requires java.desktop;
    requires jdk.jsobject;
    requires org.jsoup;
    requires aliasi.lingpipe;
    requires org.controlsfx.controls;
    requires org.apache.commons.lang3;
    requires org.graalvm.sdk;
    requires org.graalvm.js;
    requires slf4j.api;
    requires java.net.http;
    requires org.apache.logging.log4j;

    exports com.zds.zw;
}

If I try to build with gradle jlink i have this error :

./zest-writer/build/jlinkbase/tmpjars/com.zds.zw.merged.module/module-info.java:390: error: PluginHandler is not public in com.sun.webkit.plugin; cannot be accessed from outside package
    uses com.sun.webkit.plugin.PluginHandler;
                              ^
1 error

And merge file module-info.java content this

open module com.zds.zw.merged.module {
    exports com.aliasi.chunk;
    exports com.aliasi.classify;
    exports com.aliasi.cluster;
    exports com.aliasi.coref;
    exports com.aliasi.coref.matchers;
    exports com.aliasi.corpus;
    exports com.aliasi.crf;
    exports com.aliasi.dca;
    exports com.aliasi.dict;
    exports com.aliasi.features;
    exports com.aliasi.hmm;
    exports com.aliasi.io;
    exports com.aliasi.lm;
    exports com.aliasi.matrix;
    exports com.aliasi.sentences;
    exports com.aliasi.spell;
    exports com.aliasi.stats;
    exports com.aliasi.suffixarray;
    exports com.aliasi.symbol;
    exports com.aliasi.tag;
    exports com.aliasi.test.unit;
    exports com.aliasi.test.unit.chunk;
    exports com.aliasi.test.unit.classify;
    exports com.aliasi.test.unit.cluster;
    exports com.aliasi.test.unit.coref;
    exports com.aliasi.test.unit.coref.matchers;
    exports com.aliasi.test.unit.corpus;
    exports com.aliasi.test.unit.crf;
    exports com.aliasi.test.unit.dca;
    exports com.aliasi.test.unit.dict;
    exports com.aliasi.test.unit.features;
    exports com.aliasi.test.unit.hmm;
    exports com.aliasi.test.unit.io;
    exports com.aliasi.test.unit.lm;
    exports com.aliasi.test.unit.matrix;
    exports com.aliasi.test.unit.sentences;
    exports com.aliasi.test.unit.spell;
    exports com.aliasi.test.unit.stats;
    exports com.aliasi.test.unit.suffixarray;
    exports com.aliasi.test.unit.symbol;
    exports com.aliasi.test.unit.tag;
    exports com.aliasi.test.unit.tokenizer;
    exports com.aliasi.test.unit.util;
    exports com.aliasi.test.unit.xml;
    exports com.aliasi.tokenizer;
    exports com.aliasi.util;
    exports com.aliasi.version;
    exports com.aliasi.xml;
    exports com.fasterxml.jackson.annotation;
    exports com.fasterxml.jackson.core;
    exports com.fasterxml.jackson.core.async;
    exports com.fasterxml.jackson.core.base;
    exports com.fasterxml.jackson.core.exc;
    exports com.fasterxml.jackson.core.filter;
    exports com.fasterxml.jackson.core.format;
    exports com.fasterxml.jackson.core.io;
    exports com.fasterxml.jackson.core.json;
    exports com.fasterxml.jackson.core.json.async;
    exports com.fasterxml.jackson.core.sym;
    exports com.fasterxml.jackson.core.type;
    exports com.fasterxml.jackson.core.util;
    exports com.fasterxml.jackson.databind;
    exports com.fasterxml.jackson.databind.annotation;
    exports com.fasterxml.jackson.databind.cfg;
    exports com.fasterxml.jackson.databind.deser;
    exports com.fasterxml.jackson.databind.deser.impl;
    exports com.fasterxml.jackson.databind.deser.std;
    exports com.fasterxml.jackson.databind.exc;
    exports com.fasterxml.jackson.databind.ext;
    exports com.fasterxml.jackson.databind.introspect;
    exports com.fasterxml.jackson.databind.json;
    exports com.fasterxml.jackson.databind.jsonFormatVisitors;
    exports com.fasterxml.jackson.databind.jsonschema;
    exports com.fasterxml.jackson.databind.jsontype;
    exports com.fasterxml.jackson.databind.jsontype.impl;
    exports com.fasterxml.jackson.databind.module;
    exports com.fasterxml.jackson.databind.node;
    exports com.fasterxml.jackson.databind.ser;
    exports com.fasterxml.jackson.databind.ser.impl;
    exports com.fasterxml.jackson.databind.ser.std;
    exports com.fasterxml.jackson.databind.type;
    exports com.fasterxml.jackson.databind.util;
    exports com.ibm.icu.impl;
    exports com.ibm.icu.impl.coll;
    exports com.ibm.icu.impl.data;
    exports com.ibm.icu.impl.duration;
    exports com.ibm.icu.impl.duration.impl;
    exports com.ibm.icu.impl.locale;
    exports com.ibm.icu.impl.number;
    exports com.ibm.icu.impl.number.parse;
    exports com.ibm.icu.impl.number.range;
    exports com.ibm.icu.impl.text;
    exports com.ibm.icu.lang;
    exports com.ibm.icu.math;
    exports com.ibm.icu.number;
    exports com.ibm.icu.text;
    exports com.ibm.icu.util;
    exports com.sun.glass.events;
    exports com.sun.glass.ui;
    exports com.sun.glass.ui.delegate;
    exports com.sun.glass.ui.gtk;
    exports com.sun.glass.utils;
    exports com.sun.java.scene.web;
    exports com.sun.javafx;
    exports com.sun.javafx.animation;
    exports com.sun.javafx.application;
    exports com.sun.javafx.beans;
    exports com.sun.javafx.beans.event;
    exports com.sun.javafx.binding;
    exports com.sun.javafx.charts;
    exports com.sun.javafx.collections;
    exports com.sun.javafx.css;
    exports com.sun.javafx.css.parser;
    exports com.sun.javafx.cursor;
    exports com.sun.javafx.effect;
    exports com.sun.javafx.embed;
    exports com.sun.javafx.event;
    exports com.sun.javafx.font;
    exports com.sun.javafx.font.coretext;
    exports com.sun.javafx.font.directwrite;
    exports com.sun.javafx.font.freetype;
    exports com.sun.javafx.fxml;
    exports com.sun.javafx.fxml.builder;
    exports com.sun.javafx.fxml.builder.web;
    exports com.sun.javafx.fxml.expression;
    exports com.sun.javafx.geom;
    exports com.sun.javafx.geom.transform;
    exports com.sun.javafx.geometry;
    exports com.sun.javafx.iio;
    exports com.sun.javafx.iio.bmp;
    exports com.sun.javafx.iio.common;
    exports com.sun.javafx.iio.gif;
    exports com.sun.javafx.iio.ios;
    exports com.sun.javafx.iio.jpeg;
    exports com.sun.javafx.iio.png;
    exports com.sun.javafx.image;
    exports com.sun.javafx.image.impl;
    exports com.sun.javafx.logging;
    exports com.sun.javafx.media;
    exports com.sun.javafx.menu;
    exports com.sun.javafx.perf;
    exports com.sun.javafx.print;
    exports com.sun.javafx.property;
    exports com.sun.javafx.property.adapter;
    exports com.sun.javafx.reflect;
    exports com.sun.javafx.runtime;
    exports com.sun.javafx.runtime.async;
    exports com.sun.javafx.runtime.eula;
    exports com.sun.javafx.scene;
    exports com.sun.javafx.scene.canvas;
    exports com.sun.javafx.scene.control;
    exports com.sun.javafx.scene.control.behavior;
    exports com.sun.javafx.scene.control.inputmap;
    exports com.sun.javafx.scene.control.skin;
    exports com.sun.javafx.scene.control.skin.resources;
    exports com.sun.javafx.scene.input;
    exports com.sun.javafx.scene.layout;
    exports com.sun.javafx.scene.layout.region;
    exports com.sun.javafx.scene.media;
    exports com.sun.javafx.scene.paint;
    exports com.sun.javafx.scene.shape;
    exports com.sun.javafx.scene.text;
    exports com.sun.javafx.scene.transform;
    exports com.sun.javafx.scene.traversal;
    exports com.sun.javafx.scene.web;
    exports com.sun.javafx.scene.web.behavior;
    exports com.sun.javafx.sg.prism;
    exports com.sun.javafx.sg.prism.web;
    exports com.sun.javafx.stage;
    exports com.sun.javafx.text;
    exports com.sun.javafx.tk;
    exports com.sun.javafx.tk.quantum;
    exports com.sun.javafx.util;
    exports com.sun.javafx.webkit;
    exports com.sun.javafx.webkit.prism;
    exports com.sun.javafx.webkit.prism.theme;
    exports com.sun.javafx.webkit.theme;
    exports com.sun.marlin;
    exports com.sun.marlin.stats;
    exports com.sun.media.jfxmedia;
    exports com.sun.media.jfxmedia.control;
    exports com.sun.media.jfxmedia.effects;
    exports com.sun.media.jfxmedia.events;
    exports com.sun.media.jfxmedia.locator;
    exports com.sun.media.jfxmedia.logging;
    exports com.sun.media.jfxmedia.track;
    exports com.sun.media.jfxmediaimpl;
    exports com.sun.media.jfxmediaimpl.platform;
    exports com.sun.media.jfxmediaimpl.platform.gstreamer;
    exports com.sun.media.jfxmediaimpl.platform.java;
    exports com.sun.openpisces;
    exports com.sun.pisces;
    exports com.sun.prism;
    exports com.sun.prism.es2;
    exports com.sun.prism.image;
    exports com.sun.prism.impl;
    exports com.sun.prism.impl.packrect;
    exports com.sun.prism.impl.paint;
    exports com.sun.prism.impl.ps;
    exports com.sun.prism.impl.shape;
    exports com.sun.prism.j2d;
    exports com.sun.prism.j2d.paint;
    exports com.sun.prism.j2d.print;
    exports com.sun.prism.paint;
    exports com.sun.prism.ps;
    exports com.sun.prism.shader;
    exports com.sun.prism.shape;
    exports com.sun.prism.sw;
    exports com.sun.scenario;
    exports com.sun.scenario.animation;
    exports com.sun.scenario.animation.shared;
    exports com.sun.scenario.effect;
    exports com.sun.scenario.effect.impl;
    exports com.sun.scenario.effect.impl.es2;
    exports com.sun.scenario.effect.impl.hw;
    exports com.sun.scenario.effect.impl.prism;
    exports com.sun.scenario.effect.impl.prism.ps;
    exports com.sun.scenario.effect.impl.prism.sw;
    exports com.sun.scenario.effect.impl.state;
    exports com.sun.scenario.effect.impl.sw;
    exports com.sun.scenario.effect.impl.sw.java;
    exports com.sun.scenario.effect.impl.sw.sse;
    exports com.sun.scenario.effect.light;
    exports com.sun.util.reentrant;
    exports com.sun.webkit;
    exports com.sun.webkit.dom;
    exports com.sun.webkit.event;
    exports com.sun.webkit.graphics;
    exports com.sun.webkit.network;
    exports com.sun.webkit.network.about;
    exports com.sun.webkit.network.data;
    exports com.sun.webkit.perf;
    exports com.sun.webkit.plugin;
    exports com.sun.webkit.text;
    exports javafx.animation;
    exports javafx.application;
    exports javafx.beans;
    exports javafx.beans.binding;
    exports javafx.beans.property;
    exports javafx.beans.property.adapter;
    exports javafx.beans.value;
    exports javafx.collections;
    exports javafx.collections.transformation;
    exports javafx.concurrent;
    exports javafx.css;
    exports javafx.css.converter;
    exports javafx.event;
    exports javafx.fxml;
    exports javafx.geometry;
    exports javafx.print;
    exports javafx.scene;
    exports javafx.scene.canvas;
    exports javafx.scene.chart;
    exports javafx.scene.control;
    exports javafx.scene.control.cell;
    exports javafx.scene.control.skin;
    exports javafx.scene.effect;
    exports javafx.scene.image;
    exports javafx.scene.input;
    exports javafx.scene.layout;
    exports javafx.scene.media;
    exports javafx.scene.paint;
    exports javafx.scene.robot;
    exports javafx.scene.shape;
    exports javafx.scene.text;
    exports javafx.scene.transform;
    exports javafx.scene.web;
    exports javafx.stage;
    exports javafx.util;
    exports javafx.util.converter;
    exports org.apache.commons.io;
    exports org.apache.commons.io.comparator;
    exports org.apache.commons.io.file;
    exports org.apache.commons.io.filefilter;
    exports org.apache.commons.io.function;
    exports org.apache.commons.io.input;
    exports org.apache.commons.io.input.buffer;
    exports org.apache.commons.io.monitor;
    exports org.apache.commons.io.output;
    exports org.apache.commons.io.serialization;
    exports org.apache.commons.lang3;
    exports org.apache.commons.lang3.arch;
    exports org.apache.commons.lang3.builder;
    exports org.apache.commons.lang3.compare;
    exports org.apache.commons.lang3.concurrent;
    exports org.apache.commons.lang3.event;
    exports org.apache.commons.lang3.exception;
    exports org.apache.commons.lang3.math;
    exports org.apache.commons.lang3.mutable;
    exports org.apache.commons.lang3.reflect;
    exports org.apache.commons.lang3.text;
    exports org.apache.commons.lang3.text.translate;
    exports org.apache.commons.lang3.time;
    exports org.apache.commons.lang3.tuple;
    exports org.apache.logging.log4j;
    exports org.apache.logging.log4j.core;
    exports org.apache.logging.log4j.core.appender;
    exports org.apache.logging.log4j.core.appender.db;
    exports org.apache.logging.log4j.core.appender.db.jdbc;
    exports org.apache.logging.log4j.core.appender.mom;
    exports org.apache.logging.log4j.core.appender.mom.jeromq;
    exports org.apache.logging.log4j.core.appender.mom.kafka;
    exports org.apache.logging.log4j.core.appender.nosql;
    exports org.apache.logging.log4j.core.appender.rewrite;
    exports org.apache.logging.log4j.core.appender.rolling;
    exports org.apache.logging.log4j.core.appender.rolling.action;
    exports org.apache.logging.log4j.core.appender.routing;
    exports org.apache.logging.log4j.core.async;
    exports org.apache.logging.log4j.core.config;
    exports org.apache.logging.log4j.core.config.builder.api;
    exports org.apache.logging.log4j.core.config.builder.impl;
    exports org.apache.logging.log4j.core.config.composite;
    exports org.apache.logging.log4j.core.config.json;
    exports org.apache.logging.log4j.core.config.plugins;
    exports org.apache.logging.log4j.core.config.plugins.convert;
    exports org.apache.logging.log4j.core.config.plugins.processor;
    exports org.apache.logging.log4j.core.config.plugins.util;
    exports org.apache.logging.log4j.core.config.plugins.validation;
    exports org.apache.logging.log4j.core.config.plugins.validation.constraints;
    exports org.apache.logging.log4j.core.config.plugins.validation.validators;
    exports org.apache.logging.log4j.core.config.plugins.visitors;
    exports org.apache.logging.log4j.core.config.properties;
    exports org.apache.logging.log4j.core.config.status;
    exports org.apache.logging.log4j.core.config.xml;
    exports org.apache.logging.log4j.core.config.yaml;
    exports org.apache.logging.log4j.core.filter;
    exports org.apache.logging.log4j.core.impl;
    exports org.apache.logging.log4j.core.jackson;
    exports org.apache.logging.log4j.core.jmx;
    exports org.apache.logging.log4j.core.layout;
    exports org.apache.logging.log4j.core.lookup;
    exports org.apache.logging.log4j.core.message;
    exports org.apache.logging.log4j.core.net;
    exports org.apache.logging.log4j.core.net.ssl;
    exports org.apache.logging.log4j.core.osgi;
    exports org.apache.logging.log4j.core.parser;
    exports org.apache.logging.log4j.core.pattern;
    exports org.apache.logging.log4j.core.script;
    exports org.apache.logging.log4j.core.selector;
    exports org.apache.logging.log4j.core.time;
    exports org.apache.logging.log4j.core.time.internal;
    exports org.apache.logging.log4j.core.tools;
    exports org.apache.logging.log4j.core.tools.picocli;
    exports org.apache.logging.log4j.core.util;
    exports org.apache.logging.log4j.core.util.datetime;
    exports org.apache.logging.log4j.message;
    exports org.apache.logging.log4j.simple;
    exports org.apache.logging.log4j.spi;
    exports org.apache.logging.log4j.status;
    exports org.apache.logging.log4j.util;
    exports org.apache.logging.log4j.util.internal;
    exports org.apache.logging.slf4j;
    exports org.fxmisc.wellbehaved.event;
    exports org.fxmisc.wellbehaved.event.internal;
    exports org.fxmisc.wellbehaved.event.template;
    exports org.jsoup;
    exports org.jsoup.helper;
    exports org.jsoup.internal;
    exports org.jsoup.nodes;
    exports org.jsoup.parser;
    exports org.jsoup.safety;
    exports org.jsoup.select;
    exports org.slf4j;
    exports org.slf4j.event;
    exports org.slf4j.helpers;
    exports org.slf4j.impl;
    exports org.slf4j.spi;
    exports org.zeroturnaround.zip;
    exports org.zeroturnaround.zip.commons;
    exports org.zeroturnaround.zip.extra;
    exports org.zeroturnaround.zip.timestamps;
    exports org.zeroturnaround.zip.transform;
    requires java.management;
    requires java.naming;
    requires java.logging;
    requires jdk.xml.dom;
    requires java.scripting;
    requires java.sql;
    requires java.rmi;
    requires java.xml;
    requires java.desktop;
    requires java.compiler;
    requires jdk.jsobject;
    requires jdk.unsupported;
    uses org.apache.logging.log4j.util.PropertySource;
    uses org.apache.logging.log4j.core.util.WatchEventService;
    uses org.apache.logging.log4j.spi.Provider;
    uses java.nio.file.spi.FileSystemProvider;
    uses com.sun.webkit.plugin.PluginHandler;
    uses org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory;
    provides com.fasterxml.jackson.core.JsonFactory with com.fasterxml.jackson.core.JsonFactory;
    provides org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory with org.apache.logging.log4j.core.message.ExtendedThreadInfoFactory;
    provides javax.annotation.processing.Processor with org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor;
    provides org.apache.logging.log4j.spi.Provider with org.apache.logging.log4j.core.impl.Log4jProvider;
    provides com.fasterxml.jackson.core.ObjectCodec with com.fasterxml.jackson.databind.ObjectMapper;
    provides org.apache.logging.log4j.util.PropertySource with org.apache.logging.log4j.util.EnvironmentPropertySource,
                org.apache.logging.log4j.util.SystemPropertiesPropertySource;
}

So can you give me some tips to build my app ?

By the way, the gradle run command work find, but not jlink.

firm1

siordache commented 4 years ago

Put this in your build.gradle:

jlink {
    ....
    mergedModule {
        excludeUses 'com.sun.webkit.plugin.PluginHandler'
    }
}
firm1 commented 4 years ago

Thank you for your return. It's work better with this.

Merge task is ok, but the jlink task failed on another task, with this error :

Starting process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/jlink''. Working directory: /zest-writer Command: /usr/lib/jvm/java-11-openjdk-amd64/bin/jlink -v --strip-debug --compress 2 --no-header-files --no-man-pages --module-path /usr/lib/jvm/java-11-openjdk-amd64/jmods/:/zest-writer/build/jlinkbase/jlinkjars --add-modules com.zds.zw.merged.module,java.desktop,jdk.jsobject,java.xml,jdk.xml.dom,java.scripting,java.sql,java.logging,java.rmi,java.naming,java.compiler,java.management,jdk.management,jdk.unsupported --output /zest-writer/build/image
Successfully started process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/jlink''
Error: Hash of java.rmi (dbdd1743ad46fdcec1055b9fcd3a4023baaf9e150f74219e148203fb534d0d46) differs to expected hash (5ecada091e5112b6ca35d5b4137ae9853babe405c419bea5f1060b488014e384) recorded in java.base

Do you have some advices for me ?

siordache commented 4 years ago

See #111. Try installing another JDK.

siordache commented 4 years ago

See also this and this.

firm1 commented 4 years ago

Many thanks for all. It's work better when i tried with Oracle JDK 11 ... but (because i have problem again), the package doens't work.

On linux (ubuntu) if i try to run binary file, i have this error.

./zestwriter 

Error: JavaFX runtime components are missing, and are required to run this application

I don't understand. I have this jars on my lib dir :

ls lib/app/mods/
aliasi-lingpipe-4.1.2-JL1.0.jar  asm-util-7.1.jar            controlsfx-11.0.2.jar                              jackson-annotations-2.11.1.jar  javafx-fxml-13-linux.jar      jsoup-1.13.1.jar             profiler-20.1.0.jar      zest-writer-1.9.0.jar
asm-7.1.jar                      chromeinspector-20.1.0.jar  fontawesomefx-commons-9.1.2.jar                    jackson-core-2.11.1.jar         javafx-graphics-13-linux.jar  js-scriptengine-20.1.0.jar   regex-20.1.0.jar         zest-writer.merged.module-1.9.0.jar
asm-analysis-7.1.jar             commons-io-2.7.jar          fontawesomefx-materialdesignfont-2.0.26-9.1.2.jar  jackson-databind-2.11.1.jar     javafx-media-13-linux.jar     log4j-api-2.12.1.jar         slf4j-api-1.7.25.jar     zt-zip-1.14.jar
asm-commons-7.1.jar              commons-lang3-3.9.jar       graal-sdk-20.1.0.jar                               javafx-base-13-linux.jar        javafx-web-13-linux.jar       log4j-core-2.12.1.jar        truffle-api-20.1.0.jar
asm-tree-7.1.jar                 commons-text-1.8.jar        icu4j-66.1.jar                                     javafx-controls-13-linux.jar    js-20.1.0.jar                 log4j-slf4j-impl-2.12.1.jar  wellbehavedfx-0.3.3.jar
siordache commented 4 years ago

Create a class named Launcher.java in the com.zds.zw package:

package com.zds.zw;

public class Launcher {
    public static void main(String[] args) {
        MainApp.main(args);
    }
}

Then, in build.gradle change mainClassNameto:

application {
    mainClassName = "com.zds.zw.Launcher"
}
firm1 commented 4 years ago

Thanks for all.

It's wark fine !