IRONSOFTWAREHOME

Java 25 Deprecated-API Warnings on RHEL 9.7

Curtis Chau
Curtis Chau
Updated: July 3, 2026

After upgrading to Java 25 on RHEL 9.7, IronPDF for Java logs deprecated-API warnings that reference internal Java APIs such as sun.misc.Unsafe::allocateMemory. PDF generation keeps working; the warnings are informational, but they can raise compliance concerns in regulated environments.

The warnings come from the gRPC/Netty transport libraries IronPDF uses internally, not from IronPDF's own code. Those libraries still call sun.misc.Unsafe for direct memory access. Java 23 deprecated the sun.misc.Unsafe memory-access methods for removal (JEP 471), and Java 24 and later warn when they are used (JEP 498), which is why the warnings surface now.

Solution

1. Confirm the warnings are non-blocking

Check that rendering still succeeds before changing anything. The messages are warnings, not errors, and no runtime issues have been observed. PDF generation functions as expected, so you are clearing noise, not fixing a fault.

2. Add the access flags to your JVM startup arguments

Pass these options when launching your application so the JVM opens the internal package the transport libraries require:

--enable-native-access=ALL-UNNAMED
--sun-misc-unsafe-memory-access=allow
SHELL

The first flag permits native access for unnamed modules; the second re-enables the sun.misc.Unsafe memory API the gRPC/Netty stack depends on. Neither changes IronPDF behaviour; together they suppress the deprecation warnings.

Warning: These flags are interim mitigation, not a permanent fix. The long-term resolution is updating the bundled gRPC/Netty libraries to versions that no longer depend on sun.misc.Unsafe. Future Java releases could tighten enforcement further and break this workaround.
Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Version:2026.8just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
Java Maven Library for PDF
Install with Maven

Version: 2026.8

<dependency>
   <groupId>com.ironsoftware</groupId>
   <artifactId>ironpdf</artifactId>
   <version>2026.8.2</version>
</dependency>
https://central.sonatype.com/artifact/com.ironsoftware/ironpdf/2026.8.2
or
Java PDF JAR
Download JAR

Version: 2026.8

Download Now

Manually install into your project

Key in blue circle

Get your free 30-day Trial Key instantly.

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required