jdk9-jlink-jmod-example | Example for using maven-jmod-plugin / maven-jlink-plugin | Plugin library
kandi X-RAY | jdk9-jlink-jmod-example Summary
kandi X-RAY | jdk9-jlink-jmod-example Summary
Example for using maven-jmod-plugin / maven-jlink-plugin
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Test program .
jdk9-jlink-jmod-example Key Features
jdk9-jlink-jmod-example Examples and Code Snippets
Community Discussions
Trending Discussions on jdk9-jlink-jmod-example
QUESTION
I'm using this Github project to get exposed to the new modular features in Java 9. I would like to add dependencies to the project and be able to build a native image. However, when I try to add a new dependency to the pom.xml, and add the requires statement to the module-info.java, I get a the following error from the maven-jlink-plugin:
...ANSWER
Answered 2017-Nov-03 at 19:53This has not much to do with the plugin I believe. Module joda.time
in your case seems to be an automatic module.
The jlink
tool does not support linking of automatic modules because they can rely on the arbitrary content of the classpath, which goes against the idea of a self-contained Java runtime.
So there are two ways to fix this probably :-
(you don't own the jar) Temporarily go ahead create a
module-info.java
[you could usejdeps
tool for it] and update the jar[usingjar
tool] with the corresponding compiled class as in projects under Java 9.(you own the dependency) Permanently migrate the jar to Java 9 itself, where it would consist of the
module-info.class
by itself after being compiled and packaged.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jdk9-jlink-jmod-example
You can use jdk9-jlink-jmod-example like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the jdk9-jlink-jmod-example component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page