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

Controlling already existing instance of ImageJ

First of all, I'm not very well-versed in Java. In fact, I'm using JLink/Mathematica to do what I want to do. In our lab, we are taking pictures of our experiment using cameras controlled by Mathematica. We want to convert our image display program…
0
votes
0 answers

Maven JLink plugin error `Unsupported class file major version 61`

Running the Maven JLink plugin I get an error Unsupported class file major version 61. I'm using the BellSoft Liberica 17 Full JDK for the project. The JRE for the Maven runner is set to 'Use Project JDK', so it should be the same. I use the Maven…
wouterio
  • 137
  • 1
  • 10
0
votes
0 answers

Can't to create a custom runtime image with MSSQL JDBC Driver

How to create a custom runtime image with MSSQL JDBC Driver? I created a new JavaFX project using and IntelliJ IDEA. I added to dependency MSSQL JDBC Driver to my pom-file. pom.xml
Etarus
  • 13
  • 5
0
votes
1 answer

jpackage has started failing on Mac OS due to: jlink failed with: WARNING: Using incubator modules: jdk.incubator.foreign, jdk.incubator.vector

jpackage has been working fine until today on Mac OS. Now it fails due to some internal use of an incubator package. Is there a workaround for this? It still works fine on windows. openjdk version "17.0.8" 2023-07-18 LTS OpenJDK Runtime Environment…
John Baker
  • 89
  • 12
0
votes
1 answer

Maven jlink plugin: native libraries not found when running the resulting image

Context: Linux Mint 21.1, Java Adoptium 17.0.7 JDK, Maven 3.6.3. My modular application uses LWJGL (and then its native libraries); using the Maven jlink plug-in I generate a Java image. During generation, the jlink plug-in prints the…
0
votes
0 answers

Why jlink custom Java runtime image produces blurry Swing app?

We are using JDK FX 17 from https://www.azul.com/downloads/#zulu We build a custom Java runtime image using the following command jlink --no-header-files --no-man-pages --compress=2 --strip-debug --module-path "C:\Program Files\Zulu\zulu-17\jmods"…
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
0
votes
0 answers

Adding multiple --module-path with JLink

I was following this tutorial to create a runtime image using JLink. When I reached this part jlink --module-path "%JAVA_HOME%\jmods";out --add-modules jlinkModule --output customjre The semicolon seperated commands in Windows terminal…
0
votes
1 answer

How can I integrate MySQL JDBC driver and JLink in a JavaFX application?

Basically, when I'm running my modular project on eclipse, it works fine but when I use jlink to create a runtime image, it throws an error for mysql connection. Caused by: java.sql.SQLException: No suitable driver found for…
0
votes
0 answers

Why does Jenkins hang while running my python script that uses PYLINK library?

Jenkins hangs while running python script that uses PYLINK library. I am a newb at using python and Jenkins but have managed to script some functional test together for a piece of hardware. However I've run into an issue where when i run a python…
0
votes
0 answers

jlink generated runtime does not contain Java binary

I am trying to generate a JRE using jlink. I do so by executing: /Library/Java/JavaVirtualMachines/temurin-18.jdk/Contents/Home/bin/jlink --verbose --output /Users/alex/sources/project/target/runtime --module-path…
kerner1000
  • 3,382
  • 1
  • 37
  • 57
0
votes
0 answers

Get a fuctionnal jar with jlink

I am working on a JAVA project with ECLIPSE. I would like to use XSLT3. For that, I need to import a package called SAXON.HE.jar My Java Version is 14. When I use jdeps to get the SAXON.HE.jar dependencies, I get : net.sf.saxon.trans ->…
pouce
  • 21
  • 5
0
votes
0 answers

JLink: Cannot find module-info.java in project

I was trying to create runtime for my project, but suddenly I got an error and I couldn't find any info about it. The project is setted up as kotlin+gradle and nothing more. I use badass-jlink-plugin and log4j2. The error: Execution failed for task…
AdisAlagic
  • 436
  • 2
  • 8
0
votes
0 answers

How to add org.jsoup library as module in multimodule project and compile with jlink?

I'm need help with jlink packaging. I have a multi module project and use Maven. Project: -module1; -module2; -module3. Module3 it's JavaFx and depends on module2. Module2 depends on Jsoup library (from maven repository) and I put as dependency in…
mr.ANDREW
  • 51
  • 1
  • 7
0
votes
1 answer

jdeps does not add jdk.random when using RandomGenerator.getDefault()

I have a Java 17 application which uses RandomGenerator.getDefault() in it. When I use jdeps to create a minified JRE for it, it does not add jdk.random, so the JRE created by jlink cannot run the application. Is there something I missed?
Amir Pashazadeh
  • 7,170
  • 3
  • 39
  • 69
0
votes
1 answer

MySQL-Connector does not work after using JLink in a JavaFx project

I am trying to create an executable out of my JavaFX project that uses mysql-connector driver to connect to a local database. After i generate the JLink folder via the pom.xml file, when i run my application, the connection between the database and…
Morph3us
  • 5
  • 1