Closed lhDream closed 2 years ago
System: Windows 10
java version: openjdk version "17.0.2" 2022-01-18
Hi @lhDream!
It seems that as your example is using SSL, module jdk.crypto.ec
is necessary ... why jdeps
is not able to find this module? Because it's implemented as a service, so this module is decoupled of java.base
(it's not required). It's explained here.
You can specify this additional module in the JavaPackager configuration:
<additionalModules>
<additionalModule>jdk.crypto.ec</additionalModule>
</additionalModules>
Hi @fvarrui You're right. How to judge which module is missing or which module is missing?
Hi @lhDream!
That is a very good question. jdeps
helps to find modules which require others explicitly, but with services I really don't know it
I'm working on adding support for Java Modules in JavaPackager, and I'm learning about all this. I hope I can find a way to improve the dependencies analysis to avoid these issues
Hi @fvarrui It may be considered that when the client uses communication related functions, the corresponding module of the server should be added.Or add plug-in support like Lombok? Although I am using jdk17, I don't know much about Java modularity In fact, many people are using java8 :smile:
I tried creating a modular project and adding the jdk.crypto.ec module, but jedps still can't find the module. :confused:
module test{
exports test;
requires jdk.crypto.ec;
requires java.base;
}
Hi @fvarrui!
I tried creating a modular project and adding the jdk.crypto.ec module, but jedps still can't find the module. š
It's a bit weird š¤·āāļø
After some googling, I've found an article which confirms that this could happens, but it doesn't explain why:
:slightly_frowning_face:
I'm not sure about this, but maybe it's due to jdk.crypto.ec
module doesn't export anything:
module jdk.crypto.ec {
provides java.security.Provider with sun.security.ec.SunEC;
}
It just provides an implementation of the java.security.Provider
interface š¤·āāļø
No, this is not the problem š
I'm not sure about this, but maybe it's due to
jdk.crypto.ec
module doesn't export anything:module jdk.crypto.ec { provides java.security.Provider with sun.security.ec.SunEC; }
It just provides an implementation of the
java.security.Provider
interface š¤·āāļø
Maybe because of SPI. š¤ I'm not sure.
I'm submitting aā¦
There will be some function exceptions when generating custom JRE. The simplest example:
Plug in configuration: