Questions tagged [jmod]

10 questions
87
votes
2 answers

Why did Java 9 introduce the JMOD file format?

Java 9 has three ways to package compiled code in files: JAR JMOD JIMAGE JIMAGE is optimized for speed and space and used by the JVM at runtime so it makes sense why JIMAGE was introduced. JIMAGE files are not supposed to be published to maven…
ams
  • 60,316
  • 68
  • 200
  • 288
27
votes
6 answers

How to extract the file jre-9/lib/modules?

In JRE-9/lib directory (at least on Windows), there is a new file called modules whose size is about 107 MB. Is it possible to extract that file or maybe list java modules within it? I can see that a new tool called jmod is available at…
Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
6
votes
1 answer

Can I provide runtime compiler access when running with JRE in Java 9+?

I'm migrating an application to Java 10. Our application normally runs with the JRE, but we allow users to compile bits of their own custom code by bundling tools.jar and using reflection to load a JavacTool instance on demand. Our method looks…
rainbowgoblin
  • 1,221
  • 12
  • 28
5
votes
2 answers

Getting Error java.util.zip.ZipException: duplicate entry: classes/META-INF/MANIFEST.MF When Deploying Application using JMod Plugin

Im using OpenJDK9 and created a parent child structure to deploy the app using JLink and JMod. I follow the jigsaw example on Internet to create my structure of App. Before I was getting path must be directory when using JMod 3.0.0-alpha-1, then i…
Aqeel Haider
  • 603
  • 7
  • 24
3
votes
0 answers

jmod: "Error: module-info.class not found" despite it existing in the jar file

Attempting to create a .mod file from a jar file. $JAVA_HOME/bin/jmod create --class-path ./bouncycastle/bcprov-jdk18on-171.jar bouncycastle.mod results in: Error: module-info.class not found java.io.IOException: module-info.class not found at…
marathon
  • 7,881
  • 17
  • 74
  • 137
3
votes
0 answers

How to deploy JavaFX12 app to multiple platforms with same code base

I followed the instructions to create a "Modular IDE" Project with NetBeans 11 on Windows 10: https://openjfx.io/openjfx-docs/#IDE-NetBeans I end up creating a project that looks like this: I then ran "Clean and Build" (set up jlink+jmod in…
trilogy
  • 1,738
  • 15
  • 31
2
votes
1 answer

maven-jmod-plugin:3.0.0-alpha-1 give Error create failed. IllegalArgumentException

I was Updating my Java Swing project from 1.8 to Open Source JDK 12. So i create a parent App and then a JLink module app, and add parent to my original project. When i try to run clean package, I got this error: Failed to execute goal…
Aqeel Haider
  • 603
  • 7
  • 24
1
vote
0 answers

Difficulties trying to use a jmod file

I'm using JDK 11 on Windows. I realized a modular JAR file, Uti.jar (into the directory dirLib), containing some classes in a single package, say pkg. Then I realized a simple client, say app.Maine, not a module, with a main method (a console app),…
1
vote
0 answers

Does JMOD Architecture Affect Javac Generated Class Files

I am compiling a Java 11 application, then linking for various architectures by calling the jlink command. Does the architecture of the jmod files used for the javac command affect the output in any way? Is it well-defined behavior to compile…
Jeff G
  • 4,470
  • 2
  • 41
  • 76
1
vote
1 answer

Does jshell work with jmod files?

I followed some example and I created a simple jmod. I put jmod in my jmod folder not in java jmods folder. Now, I read that jshell can export modules, but I did understand. Can jshell work with jmods? Some example? In java jmods folder there are…
Germano Carella
  • 473
  • 6
  • 14