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
2 answers

I cannot read external files from the application image created using the Java JLink tool

I cannot read external files from the application image that I created using JLink tool(mvn javaf:jlink) when the application is running. The external files are placed in the resources folder. This is the error that I got: ERROR ExecutorOfFiles…
LuisOsv
  • 339
  • 1
  • 4
  • 13
1
vote
1 answer

Using moditect to add module info to dependency without downloading the dependency

I am trying to use moditect in order to allow creating runtime image while using automated named modules (ArcGIS). ArcGIS module requires openjfx 11 (which I have added as dependency as well, since it is an JavaFX project). However, when I am trying…
1
vote
1 answer

How to use jlink with automated libraries

I am having a problem where I can not use jlink for compiling and I now kind of know what is wrong: jlink can not compile automated modules because they have unstable names. Is there a workaround or a fix for this? Here are the relevant parts of my…
user13526499
1
vote
1 answer

JavaFX, JLink/JPackage Module issue - adding Libraries "Error occurred during initialization of boot layer java.lang.module.FindException"

IDE: IntelliJ. Trying to use JavaFX for the first time with some additional libraries, and with an installable package - (c/o JLink/JPackage) Have followed directions from OpenJFX for a Modular Project from IDE and can get this to work no…
1
vote
3 answers

How do I reclaim space in Docker Image after deleting files no longer need (java jdk 11 used to make a jre)

I use Docker with a Java application, previously I used Java 8 JRE and my total docker image size was 163MB, I then moved to use Java 11 JRE and size increased to 230MB, I would prefer not to increase the size if possible. But Java 11 allows you to…
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
1
vote
1 answer

Building an executable JavaFX app with java SDK 11.0.6

I have a JavaFX app that I have successfully built and run with Java SDK 1.8. I am trying to move it to Java 11 with an ultimate goal of using Java 14 and can not create a runnable jar. To try and understand the process I have downloaded the…
user4031188
1
vote
0 answers

Packaging java applicaition in Windows 10, open JDK 11

I am migrating my development environment from a PC with Windows 7 to one with Windows 10. I can no longer run the packaging to create the executable bundle. The error I get is the following: Bundler Windows Application Image skipped because of a…
1
vote
1 answer

Flyway is not able to find migrations in classpath only if I run application after assembling it with jlink

I am using Gradle's badass-jlink-plugin in order to assembly java, my JavaFX application and its dependencies into one artifact - custom runtime - so I can share only zip file. I created a MWE for my problem which is available here:…
Victor
  • 148
  • 10
1
vote
0 answers

JLink external jar org.json in my Java app

I have a simple hello world java application, I have manually downloaded org.json and added it to my classpath so the below app runs. How can I make a custom JRE to run this app that include the jar? import org.json.JSONObject; public class Go { …
spen123
  • 3,464
  • 11
  • 39
  • 52
1
vote
1 answer

Native JavaFX OS X app bundle with JLink: can't change application name from `org.example.app.Main` in OS X menu items

I'm using JLink to create native JavaFX app. When creating OS X app bundle, I can specify CFBundleName and CFBundleDisplayName in Info.plist, but I didn't find any way to set names of menu 'Hide' and 'Quit' items. What I obtain is: How I can rename…
Stanislav Poslavsky
  • 2,398
  • 2
  • 24
  • 36
1
vote
1 answer

Is it possible to get the location of the jlink image when an application is run using the launcher?

For example, here's the outputted jlink image: ├── bin │   ├── java │   ├── keytool │   └── launcher ├── conf │   ├── net.properties │   ├── sdp │   └── security ├── include │   ├── classfile_constants.h │   ├── jni.h │   ├── jvmticmlr.h │   ├──…
gjvatsalya
  • 1,129
  • 13
  • 29
1
vote
0 answers

Error when building runtime image using javafx-maven-plugin on Windows 10 with uber-jar dependencies (javafx-graphics)

When I build hellofx sample project using javafx:run or javafx:jlink all works smoothly on Win 10 and Linux(Ubuntu 18.04). But when I add uber-jar dependencies (javafx-graphics) to pom.xml like this:
BeshEater
  • 143
  • 2
  • 7
1
vote
1 answer

JavaFx: Could not create player

I'm writing a JavaFx application targeting Java 13. I use gradle with the openjfx plugin to build my project. Building it this way ,everytime i try to create a mediaplayer i get: MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException:…
1
vote
0 answers

Apache httpcomponents modules for Java +9

I'm working with a modular java project. To export the programm with jlink I need all the dependencies to be modular, but apache httpcomponents is not. As I didn't find any httpcomponents with modular format (with the module descriptor), I'm trying…
tec
  • 999
  • 3
  • 18
  • 40
1
vote
1 answer

Using jlink command to create runtime image reports "Null charset name"

I run following command: D:\Program Files\jdk11>bin\jlink.exe --module-path jmods --add-modules java.desktop --output jre And it leads to : Error occurred during initialization of VM java.lang.IllegalArgumentException: Null charset name …
leiyijia
  • 11
  • 2