Closed ghost closed 2 years ago
Hmm, maybe Gradle does not support module-info.class
in META-INF\versions\9\
sub-folder?
Please try attached flatlaf jar, which has module-info.class
in root directory:
flatlaf-2.0-module-info-in-root.zip
(extract the ZIP)
Hmm, maybe Gradle does not support
module-info.class
inMETA-INF\versions\9\
sub-folder?
I also thought so, because after running jar tf flatlaf-2.0.jar
, I can see that it’s a multi-release jar file, where the module-info.class
is not in the root of the file, but in versions/9 directory. Java seems to support this type of file, as I tried to run my app manually from the command-line using java --module-path libs/myapp-1.0.jar:libs/flatlaf-2.0.jar --module my.module/my.module.app.Main
and it started successfully. But Gradle seems not supporting this till now.
Please try attached flatlaf jar, which has
module-info.class
in root directory: flatlaf-2.0-module-info-in-root.zip (extract the ZIP)
And thanks for this! Now I’ll add it to the libs directory and add dependency locally.
Since FlatLaf 2.0.1, module-info.class
is in root directory.
I’m trying to migrate my existing traditional project to Java 11 with support for modularity. So I’ve added a
module-info.java
at thesrc
directory, requiring modulecom.formdev.flatlaf
. Also, I’ve set the application’smainModule
property to my module, andjava.modularity.inferModulePath
set totrue
. Everything here I done is perfect for building my application as a module. But now when I try to build or run the application by./gradle build
or./gradle run
, Gradle says the modulecom.formdev.flatlaf
can’t be found! I believe this is happening not for any of my mistake, but the library jar is responsible for this. I’m able to use other libraries in the same way, except yours.