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

Modules not found when trying to inject module-info.java

I have a JavaFX project that uses Apache's PDFBox. I want to use JLink to build a JRE of it, but I can't since PDFBox is an automodule. Thus, I'm trying to inject a module-info file in it. I generated this module-info file using jdeps: module…
Allan Juan
  • 2,048
  • 1
  • 18
  • 42
0
votes
0 answers

How to include assets in app deployed with JLink?

I have a JavaFX Maven project that has the following folder structure: + -- src/ + -- -- java/ + -- -- -- com/pkg/ + -- -- -- -- App.java + -- -- resources/ + -- -- -- com/pkg/ + -- -- -- -- fxml/app.fxml + -- -- -- -- css/app.css + -- -- -- --…
Allan Juan
  • 2,048
  • 1
  • 18
  • 42
0
votes
1 answer

using java on any OS how to check if the machine is a laptop or a desk

I am writing a program to gather information specific to a laptop, linux server, desktop, workstation. The first step is to identify where my program is running. I am having trouble achieving this part. If you could point me in the right direction,…
Shashank
  • 247
  • 5
  • 17
0
votes
0 answers

Running OpenJDK 11 Project in STS IDE

I've been trying to migrate our projects from JDK 8 to OpenJDK 11. I also updated our Spring Boot version from 1.5.22 to 2.2.7. I was able to resolve the issues encountered during the migration. My only problem now is how can I run my…
Rocky
  • 429
  • 1
  • 9
  • 26
0
votes
0 answers

Jlink can't put Derby into the runtime?

UPDATE: Maybe it is better if I rephrase the question: How to tell Jlink to put the java.sql or derby into the runtime? Meantime I tried it with a 'jlinkVerbose' option in the pom file and as a result I can see this after a 'mvn clean…
Zed895
  • 39
  • 3
0
votes
0 answers

Maven, module and JasperReports

When I try to create an image via Eclipse (clean javafx:jlink) I get this errors: [WARNING] Required filename-based automodules detected. Please don't publish this project to a public artifact repository! Error: automatic module cannot be used with…
0
votes
1 answer

how to config "--enable-preview" when using javafx:jlink in javafx-maven-plugin

I use this plugin in my javafx project: https://github.com/openjfx/javafx-maven-plugin , org.openjfx javafx-maven-plugin 0.0.4 ... …
Guo
  • 1,761
  • 2
  • 22
  • 45
0
votes
2 answers

Connecting to local MySQL database doesnt work after creating an .exe with jLink + jPackage

Enivronment: OpenJDK 11, JavaFX 11, MySQL 8.0, Gradle 6.2.2, IntellijIDEA ,Windows 8.1 Problem: When I run my program inside the IDE it works fine and connects to the database without problems, but once I try to run the .exe built with jLink and…
0
votes
2 answers

Getting unsupported major.minor version error when packaging tornadofx app

I've been developing a Tornadofx app for a couple months now. It runs just fine within the IDE (intellij ultimate, win 10), but now that I need to create an actual executable jar for other people to run it, I cannot seem to get it to work. I'm…
b_camphart
  • 76
  • 1
  • 5
0
votes
1 answer

Embedding a Java application packaged as a jlink image in a macOS app

I am trying to embed a Java application into a native Mac app. The Java application is packaged with jlink (Java 9+) including a stripped down JRE. I'm trying to use the Java Invocation Interface to create the JVM and launch the main class, but the…
Alex Suzuki
  • 1,083
  • 10
  • 18
0
votes
1 answer

Understanding Deployment on Java 9+

After ignoring Java updates for quite some time, I now want to move on from the somewhat shady Java 10.0.2 Runtime I found somewhere to Java 13. As it turns out, Oracle stopped the "monolithic" JRE philosophy after Java 8 and I can't seem to find…
mindoverflow
  • 364
  • 1
  • 12
0
votes
1 answer

Enable preview features with jlinked java launcher

I am using Java 13 preview features, but I can't find the option in jlink to add the "--enable-preview" flag to the java command inside of the launcher script jlink generates. As you can see, the launcher script that is generated is…
Summers Pittman
  • 199
  • 1
  • 8
0
votes
1 answer

@ComponentScan does not detect classes in module path

I'm working on a JavaFX app with Java 11 and Spring. The app module is bundled with a custom JRE using jlink, which only allows named modules to be included in the bundle. Since Spring doesn't provide named modules but relies on automatic modules to…
IggyBlob
  • 372
  • 2
  • 13
0
votes
1 answer

Application packaged with Jlink cannot find properties file

I am migrating an application from Oracle Java 8 to openJDK11 + openJFX11. In the Java 8 version, I loaded a properties file using the following code (CryoStats is the class containing the code): try { jarLocation =…
0
votes
0 answers

using custom JRE in android Studio

I just read some new features of Java 9. There is a concept Jlink through which we can create a custom JRE and can use the path of that custom JRE in java command while running a class. So I am curious to know that how can I use that custom JRE in…
nitin tyagi
  • 1,176
  • 1
  • 19
  • 52
1 2 3
17
18