Closed firm1 closed 4 years ago
Put this in your build.gradle:
jlink {
....
mergedModule {
excludeUses 'com.sun.webkit.plugin.PluginHandler'
}
}
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 ?
See #111. Try installing another JDK.
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
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 mainClassName
to:
application {
mainClassName = "com.zds.zw.Launcher"
}
Thanks for all.
It's wark fine !
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
My module-info.java
If I try to build with
gradle jlink
i have this error :And merge file
module-info.java
content thisSo can you give me some tips to build my app ?
By the way, the
gradle run
command work find, but notjlink
.firm1