jlink

jlink packages current platform's binaries

泪湿孤枕 提交于 2021-02-19 03:58:07
问题 I am trying to build cross-platform archives of an application built using Java 11 and packaged with jlink . For the cross-platform packaging I am basing my build on this answer. I have managed to make my Gradle build download the target platform's JDK and invoke jlink with the appropriate jmods folder, however the target image always includes the binaries and JRE structure of the host platform (in my case Windows, meaning the generated bin folder always includes DLLs and Windows executables)

Compile Module that Depends on an External Jar

给你一囗甜甜゛ 提交于 2021-02-19 01:49:28
问题 I worked through a simple example using Project Jigsaw in Java 11.0.1, built using the oracle JDK 11 on Ubuntu 18.04. Following that example, I have created a simple project which compiles to a module, packages the module into a jar, and then uses jlink to create a standalone distribution. Everything works -- the end result is a smallish folder with a stripped down JRE and my module. The project is made of only three files and some folders: .: build.sh src ./src: com module-info.java ./src

How to set VM options for JLink launcher executable

流过昼夜 提交于 2021-02-18 06:41:53
问题 When using jlink , a bin/java file is generated. This executable will accept VM options by specifying options on the command line in the usual way (such as -Dsystem.property=value or -Xmx1G ). jlink also provides a --launcher option to create an executable that can be run directly, instead of having to invoke the bin/java executable with a module name. How do I make the launcher executable pre-configured to use my choice of JVM options? 回答1: You can use the add-options jlink plugin. For

Error: Hash of java.xml (…) differs to expected hash (…) recorded in java.base

对着背影说爱祢 提交于 2021-02-07 18:42:46
问题 Creating simple javafx 11 "hello world" application. Getting error while creating custom JRE. user@user:~/Desktop/javafx/hellofx$ ./run.sh Error: Hash of java.xml (c043b4c28b897656e2a4d36c92ba2f5d52134bce79643236dd36295e14178be7) differs to expected hash (4e7db7fc941d9f316c4aafe02717b5809ee722be8433d283050365e7fd49331f) recorded in java.base Error Code: $JAVA_HOME/bin/jlink --module-path $PATH_TO_FX_MODS:mods --add-modules hellofx --output hellofx #error OS: ubuntu 19.10 $java --version

Error: Hash of java.xml (…) differs to expected hash (…) recorded in java.base

↘锁芯ラ 提交于 2021-02-07 18:42:35
问题 Creating simple javafx 11 "hello world" application. Getting error while creating custom JRE. user@user:~/Desktop/javafx/hellofx$ ./run.sh Error: Hash of java.xml (c043b4c28b897656e2a4d36c92ba2f5d52134bce79643236dd36295e14178be7) differs to expected hash (4e7db7fc941d9f316c4aafe02717b5809ee722be8433d283050365e7fd49331f) recorded in java.base Error Code: $JAVA_HOME/bin/jlink --module-path $PATH_TO_FX_MODS:mods --add-modules hellofx --output hellofx #error OS: ubuntu 19.10 $java --version

How to create cross platform executables for JDK9 application using JLink command

天大地大妈咪最大 提交于 2021-01-21 12:26:53
问题 I am trying to create cross platform / platform independent executables for my JAVA-9 application / project jigsaw. I think jlink command will create only platform specific executable/runtime. 回答1: JLink (covered by JEP 282) creates modular runtime images (covered by JEP 220, particularly the section New run-time image structure ). These images are a generalization of JRE, JDK, and compact profiles and are OS specific like they are. JLink can hence not be used to create cross-platform

How to create cross platform executables for JDK9 application using JLink command

ε祈祈猫儿з 提交于 2021-01-21 12:26:37
问题 I am trying to create cross platform / platform independent executables for my JAVA-9 application / project jigsaw. I think jlink command will create only platform specific executable/runtime. 回答1: JLink (covered by JEP 282) creates modular runtime images (covered by JEP 220, particularly the section New run-time image structure ). These images are a generalization of JRE, JDK, and compact profiles and are OS specific like they are. JLink can hence not be used to create cross-platform

How to create cross platform executables for JDK9 application using JLink command

ぃ、小莉子 提交于 2021-01-21 12:25:10
问题 I am trying to create cross platform / platform independent executables for my JAVA-9 application / project jigsaw. I think jlink command will create only platform specific executable/runtime. 回答1: JLink (covered by JEP 282) creates modular runtime images (covered by JEP 220, particularly the section New run-time image structure ). These images are a generalization of JRE, JDK, and compact profiles and are OS specific like they are. JLink can hence not be used to create cross-platform

java.security.NoSuchAlgorithmException: Algorithm x25519 not available

我是研究僧i 提交于 2020-12-06 17:50:09
问题 I am getting a "javax.net.ssl.SSLException: Connection reset" for this piece of code ReadableByteChannel rbc = Channels.newChannel(url.getInputStream()); but only when running under a Java 14 JRE built with jlink from Open JDK 14. The code executes just fine if I point to the full JDK. I suspect something is missing in the JRE, but what is it and why did jlink not copy the missing files accross? My jlink command based on jdeps is as follows: "C:\Program Files\Java\jdk-14\bin\jlink.exe" --no

java.security.NoSuchAlgorithmException: Algorithm x25519 not available

不羁的心 提交于 2020-12-06 17:47:38
问题 I am getting a "javax.net.ssl.SSLException: Connection reset" for this piece of code ReadableByteChannel rbc = Channels.newChannel(url.getInputStream()); but only when running under a Java 14 JRE built with jlink from Open JDK 14. The code executes just fine if I point to the full JDK. I suspect something is missing in the JRE, but what is it and why did jlink not copy the missing files accross? My jlink command based on jdeps is as follows: "C:\Program Files\Java\jdk-14\bin\jlink.exe" --no