Paul Krill
Editor at Large

Java devs abhor Oracle’s plan to kill private APIs

news
Jul 27, 20152 mins

Oracle's plan to eliminate access to sun.misc.Unsafe would have drastic consequences, opponents fear

Key Java proponents are up in arms over the planned elimination of private API capabilities, specifically sun.misc.Unsafe, in the upcoming Java Standard Edition 9 release.

Although an officially unsupported API, sun.misc.Unsafe provides benefits like access to native memory, surpassing the limitations of the Java heap, said Hazelcast CEO Greg Luck in an interview last Friday. Hazelcast leverages the API in its in-memory data platform, enabling development and management of large caches of data, and has participated in the Java Community Process for amending Java.

“Basically, what’s happened is that hundreds of companies now rely on this private API to get their job done with Java,” said Luck.

Oracle has proposed eliminating access to the API as part of the modularization of Java. Proponents of eliminating it believe it should never have been used anyway because it was never a standard part of Java, Luck explained. The API can potentially bring instability into the JVM and cause data corruption; it should only be used by expert developers, Luck said.

A working group proposal is afoot to standardize the safe parts of the API, with the unsafe parts retired. Hazelcast is participating in this effort along with companies like Azul Systems. But Oracle is not listening, according to Luck. “If you remove this, you would kill a lot of infrastructure software that actually has now come to rely on it,” Luck said. Java performance monitor DripStat’s blog even refers to the removal of sun.misc.Unsafe in Java 9 as “a disaster in the making” that could “completely destroy the ecosystem around Java.” Oracle declined to comment Friday when asked about the elimination of private API access.

One option to avoid the issue would be to simply stick with Java 8, the current release and not upgrade, Luck said. Java 9 is due in 2016. Users, however, would find themselves on an older and eventually unsupported version of the platform.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author