Aspose.Slides compatability with Open JDK 11 (Java)

using Java11 OpenJDK we get this Warning.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.aspose.slides.ms.core.System.Drawing.imagecodecs.jpeg.oracle.OracleJpegImageReader (file:/aspose-slides-18.9-jdk16.jar) to field com.sun.imageio.plugins.jpeg.JPEGImageReader.colorSpaceCode
WARNING: Please consider reporting this to the maintainers of com.aspose.slides.ms.core.System.Drawing.imagecodecs.jpeg.oracle.OracleJpegImageReader
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

@dfplive,

I have observed the warning messages shared by you and request you to please provide the source code, sample files, Java details and Operating System details on your end with which you are able to reproduce the warning message.

a simple call to open the attached file using OpenJDK 11 causes the warning. everything seems to still work thought.

com.aspose.slides.Presentation pres = new com.aspose.slides.Presentation( filename );ExampleWarning.zip (1.6 MB)

@dfplive,

I like to share that we are going to share latest Aspose.Slides for Java 18.10 by tomorrow that has support for Java 11. We request you to please try using that version on your end once the product will be shared online.

I tested it with aspose-slides-18.10-jdk16 and the same illegal access warning occurs. It works now but it might not in future releases. thanks,

@dfplive,

This is first release whereby we have included support for Java 11 and will continue to support this. If there is any issue incurring, we will for sure rectify that on our end.

This is still an issue in 19.5:

// load the file to be converted
String dir = "src/test/resources";
Presentation document = new Presentation(dir + "/demo.pptx");
// save in different formats
document.save(dir + "/output-pptx.pdf", com.aspose.slides.SaveFormat.Pdf);

JRE stderr output:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.aspose.slides.ms.core.System.Drawing.imagecodecs.jpeg.oracle.OracleJpegImageReader (file:/Users/christopherwhite/.gradle/caches/modules-2/files-2.1/com.aspose/aspose-slides/19.5/bbf2340db3027a646cec98ec831fc62a18010e72/aspose-slides-19.5-jdk16.jar) to field com.sun.imageio.plugins.jpeg.JPEGImageReader.colorSpaceCode
WARNING: Please consider reporting this to the maintainers of com.aspose.slides.ms.core.System.Drawing.imagecodecs.jpeg.oracle.OracleJpegImageReader
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Any comment on when slides will be properly ported to JDK 11, vs just ‘works with’?

@chriswhite199,

Aspose.Slides does support Java 11. I request you to please share the source file along with Operating System and complete Java 11 JDK version details on your end. We will investigate the issuer further on our end to help you further.

demo.zip (395.4 KB)

  • Mac OS Mojave 10.14.5
  • Amazon Corretto 11.0.3 JDK

The PPTX converts to PDF successfully, it’s just the obnoxious error message printed to stderr, notably:

WARNING: All illegal access operations will be denied in a future release

My concern is that after purchasing a license for Aspose, a future JRE update would prevent me from converting pptx to pdf.

So before i go ahead and purchase a license, I’d like to know commitment to resolving the above issue in the near term, vs waiting for the break to occur and reactively patching it.

@chriswhite199,

I have observed your concerns and like to share that Aspose.Slides does support Java 11. However, I have added an issue with ID SLIDESJAVA-37669 as investigation in our issue tracking system to get further elaboration of warning messages shared by you. This thread has been linked with the issue so that you may be notified once the feedback will be available.

@chriswhite199,

We have internally observed the issue in detail. We would like to clear things up about the usage of com.sun.imageio.plugins.jpeg.JPEGImageReader class. Actually, we use this class if it is available. We also have our own implementation JPEG image reader. But, due to the fact that JPEGImageReader has a little bit better performance, we use it. If JPEGImageReader is not available we use own implementation. Thus, if this class (JPEGImageReader) will be removed in future releases, it will not break down the Aspose.Slides functionality.

I hope the shared elaboration will be helpful.