Skip to content
Apache POI 6.0 Requires JDK 17, Drops Java 8: Key Changes & Migration Gotchas

Apache POI 6.0 Requires JDK 17, Drops Java 8: Key Changes & Migration Gotchas

Apache POI 6.0 raises the minimum runtime to JDK 17, removes deprecated APIs, adds Word RTL text detection and PPTX transparent bitmap support, and changes Excel DataFormatter to read cached formula values by default — requiring explicit opt-out for dynamic data.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary

01 Minimum Requirement Java 17

Apache POI 6.0.0 raises the minimum Java version from 8 directly to 17. The release also removes a batch of long-deprecated methods and upgrades underlying dependencies such as XMLBeans and Commons IO. Whether your code calls POI directly or indirectly via libraries like EasyExcel, run mvn dependency:tree first to inspect the dependency tree and avoid compilation errors or JAR conflicts.

Apache POI 官方标识
Apache POI 官方标识
POI 6.0.0 官方变更摘要:Java 17、公式缓存默认行为与弃用方法移除
POI 6.0.0 官方变更摘要:Java 17、公式缓存默认行为与弃用方法移除

02 Word: New APIs and Version Boundaries

The XWPF module for DOCX adds several property-access methods. However, core contributor Jacobo Aragunde Pérez notes that table indentation and embedded chart access were already shipped in 5.5.0. Table indentation uses twips (1/20 point) and only takes effect when the table is left-aligned or start-aligned; other alignments ignore the setting. Reading embedded charts still uses getEmbeddedCharts(). The clear 6.0 addition is isRtl(), which detects right-to-left text runs. This is merely a property getter — no full Arabic/Hebrew layout engine is provided, so complex rendering remains the developer's responsibility.

贡献者 Jacobo Aragunde Pérez 对 DOCX 与 PPTX 相关工作的回顾
贡献者 Jacobo Aragunde Pérez 对 DOCX 与 PPTX 相关工作的回顾

03 PPT: Rendering and Style Fixes

XSLF improvements focus on rendering fidelity. Semi-transparent bitmaps, which previously lost alpha channels or turned solid, are now correctly supported. Text highlighting now integrates with the theme color system: if a document uses theme-driven highlight colors instead of hard-coded RGB, the new version resolves them correctly. Table style application logic has also been patched, improving visual fidelity when generating slide previews or converting to images.

04 Excel: Formula Default Reads Cache

The most impactful change for production systems is in DataFormatter. When formatting a cell without an explicit FormulaEvaluator, 6.0 now returns the cached formula value stored in the file, whereas 5.x returned the formula string (e.g., =SUM(A1:B1)). Cached values avoid recalculation but reflect the state at last save; if data is appended programmatically, the cache becomes stale. To restore the old behavior, call setUseCachedValuesForFormulaCells(false). For accurate up-to-date results, a full formula evaluation pass is still required.

Additionally, XSSFOptimiser merges duplicate cell styles and fonts by reusing references. It does not remove orphaned XML entries, so it cannot dramatically shrink bloated files.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

MigrationJava 8Word processingJDK 17Apache POIDataFormatterExcel formulasPPTX rendering
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.