Questions tagged [jlink]

jlink is a tool used in Java 9 or higher to assemble and optimize a set of modules and their dependencies into a custom runtime image. The tag can be used along with java9 or above tag mostly.

The several options used by the tool are documented here.. Its primary syntax is as follows:

jlink [options] --module-path modulepath --add-modules mods --output path
268 questions
1
vote
1 answer

HttpClient .send() throws IOException when running outside the IDE

I try to get the latest release tag of a Github repositiory via HttpClient. The plan is to send a request to github.com/user/repository/releases/latest and get the uri of the redirect to determine the latest release tag. When the program is running…
1
vote
1 answer

Unable to create package with jlink

My pom includes the itext7-core artifact. UTF-8 5.7.1
Fezas
  • 21
  • 5
1
vote
1 answer

java.lang.UnsatisfiedLinkError: URI scheme is not "file" with javafx:jlink

Hello i am using jnativehook library with javafx running with mvn javafx:run works fine but with mvn javafx:jlink fails to start with a launcher, here is javafx plugin xml, org.openjfx
srilakshmikanthanp
  • 2,231
  • 1
  • 8
  • 25
1
vote
0 answers

jlink compression plugin performance penalty

What is the performance penalty like for using the compression plugin to create a smaller java runtime image? I know it exists but testing separate builds of my application I could find no perceptible difference between the compressed and…
user1086516
  • 887
  • 3
  • 9
  • 21
1
vote
1 answer

How to control SQLite 3 database files directory after installing my app (Packaged using JPackage)

I'm using SQLite 3 as a database in my JavaFX app, and in goal to package everything in one file (so that the user won't need to do anything other than launch the .msi file to install it), I put database files in the resources, and package my whole…
Youssef Idraiss
  • 396
  • 5
  • 19
1
vote
2 answers

how to run another .jar file when the current program has a bundled jre?

Before when users were required to have a jre installed to run aps: ProcessBuilder builder = new ProcessBuilder("java -jar execute.jar"); Now with jlink and jpackage being released .jars can be deployed with a bundled jre. What is the correct…
jpell
  • 198
  • 2
  • 10
1
vote
0 answers

Jpackage check if mysql 8 is installed, if not install it

is there any possibility to implement MySQL 8 installation in my java project, which is packaged with jpackage, so when the user clicks on the .exe installation (made by jpackage), it simply checks if mysql8 has already been installed, if not it…
Youssef Idraiss
  • 396
  • 5
  • 19
1
vote
0 answers

Java jdeps command on a springboot jar throws error for Tomcat dependency

Im trying to create a custom slimmed down JRE for my springboot application My pom.xml: 4.0.0 org.springframework.boot spring-boot-starter-parent
Oirampok
  • 569
  • 5
  • 23
1
vote
0 answers

Use jpackage (and jlink) with signed libraries

I have a JavaFX application that uses BouncyCastle as a dependency. I want to produce an executable that embeds a lightweight JRE 15. For this, I use the java jpackage tool which work on jlink. The problem is that this command does not manage signed…
Antonin
  • 456
  • 4
  • 6
1
vote
0 answers

jlink on Windows fails w "Error: Duplicate entry!"

I am trying to build a JRE on Windows 10 with OpenJDK 11. I ALWAYS get a error message, so maybe I'm just doing something wrong. Here is a simple invocation of jlink: C:\Users\en>"C:\Program Files\AdoptOpenJDK\jdk-11.0.9.11-hotspot\bin\jlink.exe"…
1
vote
1 answer

Create a personalised JRE with Java 15 on Windows for Linux and Mac

I have found a way to create a personalised JRE on Windows that I can use on Windows. I found a similar question on this web site where the answer was "you just have to use the Linux jmods directory to make a Linux personalised JRE." So, using…
1
vote
1 answer

Gradle + Spring project will jlink, but not run using gradle inside IDE

I am trying to both run and jlink a project that uses Gradle, Spring, and JavaFX. In my first attempt, I had been able to configure some simple files for my project that allow me to run it, but not jlink it. For my more recent attempt, I used this…
Jack J
  • 1,514
  • 3
  • 20
  • 28
1
vote
0 answers

Getting NullPointerException while executing Maven JLink

The following plugin I've added in the pom.xml org.openjfx javafx-maven-plugin ${javafx.plugin.version}
Himanshu Sharma
  • 2,940
  • 1
  • 7
  • 18
1
vote
0 answers

Build custom JRE for a project with non modular dependency

I have a modular project with 4 modules. One of which is a JavaFX application. The modules have a few dependency on maven libraries that are not modularised, like jasypt. When I try to make custom JRE for my project using JLink I get this…
Prashant Prakash
  • 105
  • 1
  • 10
1
vote
0 answers

Getting automatic module error when using jlink with the org.json:json artifact

I'm creating a JavaFX project for the first time, and I'm having a bit of trouble with exporting and deploying the project. Following this tutorial, I tried using jlink, but ran into an error: Error: automatic module cannot be used with jlink: json…