Issue
i have a Java app, using maven, i am with jasperreprots dependency and all works, the problem is the warking on the unstable file name on module-info, i understand the problem, but how can i fix it? how can i use the module with a stable name ?
this is my module-info.java
module TestApp{
exports com.app.jsp;
requires jasperreports;
}
i am using eclipse. i could solve it by using classpath but i want to use modulepath
Solution
The warning is shown because the JAR you refer as jasperreprots
module does not contain a module-info.class
nor an Automatic-Module-Name: ...
entry in the MANIFEST.MF
.
So the module name jasperreports
is derived from the file name of the JAR. Renaming the JAR can change the module name breaking your module-info.java
as requires jasperreports;
would also need to be adapted to the new JAR file name and then the changed module-info.java
to be compiled again. That is why the warning says the module name that is automatically derived from the file name of the JAR is unstable.
Nowadays, almost all dependencies contain at least a MANIFEST.MF
with Automatic-Module-Name
. Most likely you are using an outdated dependency built for Java 8 or lower.
Answered By - howlger
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.