Open ptahchiev opened 6 years ago
Pardon my ignorance, but isn't imageio part of JDK? Does that mean that we need to communicate with the JDK team to include the latest release?
It used to be part of java.net but Oracle shutdown it down about a year ago, if I'm not mistaken. So jai-imageio became orphaned and this is now one of a few efforts to keep it available. (BTW if you needed jai-imageio for TIF images then Java 9 supports TIF now.)
I use it for rendering PNG images:
ImageIO.write(img, "png", baos);
and apparently javax.imageio.ImageIO
is class that comes from the JDK
According to the stack trace you provided above, you have a barcode library by nemises that triggers javax.imageio to register plugins (looking specifically for BMP image writers, I think). So maybe this library is bundled with the nemises barcode library ?
Yep, you are absolutely right:
[INFO] --- maven-dependency-plugin:3.0.2:tree (default-cli) @ samplestore ---
[INFO] com.nemesis.archetype:samplestore:war:2.0.0.BUILD-SNAPSHOT
[INFO] \- com.nemesis.platform.module:nemesis-module-barcode:jar:2.0.0.BUILD-SNAPSHOT:compile
[INFO] \- com.google.zxing:javase:jar:3.3.2:compile
[INFO] \- com.github.jai-imageio:jai-imageio-core:jar:1.3.1:runtime
[INFO] ------------------------------------------------------------------------
If using Maven, you can exclude the 1.3.1 dependency from barcode module and add the new 1.4.0 in your pom if 1.3.1 and 1.4.0 are binary compatible as I think. You need to test extensively your program.
Hope that helps.
You can try removing this dependency in zxing/javase/pom.xml
as it may not even be needed any more.
https://github.com/zxing/zxing/blob/274159117ac631ef8d48913f22ec48b0bb8d7543/javase/pom.xml#L34-L39
Note that removing the dependency probably won't produce a compile error, but your tests should fail if an image codec is needed that isn't built into Java.
Hi there,
my code works fine with JDK8, however when I try to run it with JDK9 I get this exception:
The image is rendered however, I just don't like the exception being logged.