I'm currently adding additional functionality to my program by using this library: https://haraldk.github.io/TwelveMonkeys/ TwelveMonkeys ImageIO.
It works great in Editor - Intellij IDEA 2020.1.1 but when I build the project into the jar it's not working.
Error:
Exception in thread "main" javax.imageio.IIOException: Unsupported Image Type
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1036)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1007)
at javax.imageio.ImageIO.read(ImageIO.java:1462)
at javax.imageio.ImageIO.read(ImageIO.java:1309)
This error is telling that internal java imageio used, not from TwelveMonkeys. I have tried to set priority in modules but that also didn't helped:
Java version:
java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (Zulu 8.46.0.19-CA-win64) (build 1.8.0_252-b14)
@haraldK Thanks for answer. It took me several days to actually figure out but now it's working. A little bit of explanation of what I have done:
pom.xml
all dependenciesmaven-shade-plugin
ServicesResourceTransformer
and ManifestResourceTransformer