Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Java Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-java-knowledge-patch)
---
name: java-knowledge-patch
description: Java
version: "27.0.1.1"
license: MIT
metadata:
author: Nevaberry
---
# Java Knowledge Patch
Use this skill when updating Java source, launch configurations, runtime images,
monitoring, or security configuration for the changes described here.
Load the relevant reference for the detailed behavior and migration guidance.
## Reference index
| Reference | Topics |
| --- | --- |
| [Language and APIs](references/language-and-apis.md) | Module imports, compact source files, standard streams, lazy constants |
| [Migration and removals](references/migration-and-removals.md) | Removed APIs and tools, launcher options, desktop and locale changes, JMX, VM deprecations |
| [Runtime and performance](references/runtime-and-performance.md) | Unsafe warnings, final-field mutation, runtime images, AOT caches, garbage collectors, Flight Recorder, monitoring |
| [Security and networking](references/security-and-networking.md) | JNDI, HTTP/3, datagram sockets, PEM, trust roots, cryptographic providers, Kerberos |
## Breaking changes and deprecations
### Thread stopping and script tooling
JDK 26 removes `Thread.stop()`. Calls fail to compile against JDK 26, and older
bytecode can throw `NoSuchMethodError`. Use interruption or another cooperative
cancellation mechanism.
`jrunscript` is deprecated for removal in JDK 24 and removed in JDK 26.
Replace its invocations in build and deployment scripts before upgrading.
### Removed and deprecated launcher options
Remove `-t`, `-tm`, `-Xfuture`, `-checksource`, `-cs`, and `-noasyncgc` from launch
configurations when upgrading to JDK 24.
JDK 24 deprecates `-verbosegc`, `-noclassgc`, `-verify`, `-verifyremote`, `-ss`,
`-ms`, and `-mx` for removal.
JDK 26 deprecates `Xmaxjitcodesize`, `AlwaysActAsServerClassMachine`,
`NeverActAsServerClassMachine`, `AggressiveHeap`, and `MaxRAM` for removal.
Review configurations that set these options.
### Unsafe memory-access warnings
By default, JDK 24 emits a runtime warning on the first use of the terminally
deprecated memory-access methods in `sun.misc.Unsafe`.
### Reflective final-field mutation
JDK 26 warns when deep reflection mutates a `final` field.
Use `--enable-final-field-mutation` to grant mutation permission.
Use `--illegal-final-field-mutation` to control how the runtime handles mutations
made without that permission.
### JNDI and JMX compatibility
JNDI remote code downloading is permanently disabled in JDK 24.
The `javax.naming.Context.APPLET` constant and the
`java.naming.rmi.security.manager` environment property are removed.
JDK 24 removes the legacy `serialVersionUID` compatibility logic in JMX.
XML interchange through JMX `DescriptorSupport` is deprecated for removal in
JDK 25 and removed in JDK 26. Update code that reads or writes descriptors as XML.
### Datagram sockets and performance monitoring
JDK 25 removes the ability to create datagram sockets through `java.net.Socket`
constructors. Use `DatagramSocket` or `DatagramChannel`.
JDK 25 removes PerfData sampling and the `sun.rt._sync*` performance counters.
Move monitoring that relies on them to supported JFR, JMX, or serviceability APIs.
### Trust-store and cryptographic changes
In JDK 25, the default trust store no longer includes the Baltimore CyberTrust
root or two Camerfirma roots. Check certificate chains that relied on those
roots when upgrading.
JDK 26 removes four AffirmTrust roots and the legacy JCE code-signing root from
the default trust store. Check certificate chains that relied on these roots.
JDK 25 removes the SunPKCS11 provider's PBE-related `SecretKeyFactory`
implementations. Review explicit provider selections for password-based key
factories.
JDK 26 drops older algorithm support requirements for `DESede` and `PKCS1Padding`
and adds requirements for `PBES2`. Check that your providers supply the
transformations your application uses.
### Process launch and compressed class pointers
In JDK 25, the Linux `VFORK` process launch mechanism is deprecated for removal.
Review configurations that explicitly select it for `ProcessBuilder` workloads.
The explicit `UseCompressedClassPointers` VM option is deprecated for removal in
JDK 25. Let the VM choose whether to use compressed class pointers.
## Language and API quick reference
### Compact source files and standard streams
JDK 25 places `IO` in `java.lang`. Call `IO.println(...)` in a compact source
file, or use a static import to call `println(...)` directly.
```java
void main() {
IO.println("Hello, world!");
}
```
`IO` reads from `System.in` and writes to `System.out`. It works with redirected
standard streams and in processes without an attached console.
### Module imports in the JDK 24 preview
A type-import-on-demand declaration takes precedence over a module import.
With `import module java.desktop;` and `import java.util.*;`, `List` resolves to
`java.util.List`.
`import module java.se;` also imports public types in exported `java.base`
packages because `java.se` requires `java.base` transitively.
### Lazy constants in preview code
The second preview of stable values revises the API around `LazyConstant`.
Update code using the JDK 25 preview and compile and run it with
`--enable-preview` on JDK 26.
### HTTP/3 and PEM
`java.net.http.HttpClient` supports HTTP/3 as a permanent API feature in JDK 26.
Keep fallback available where appropriate: HTTP/3 selection depends on server
support, network reachability, TLS and QUIC configuration, and client policy.
The JDK 25 preview PEM API handles certificate revocation lists as well as keys
and certificates. It supports both encoding to PEM and decoding from it.
## Runtime and diagnostics quick reference
### Runtime images and AOT caches
JDK 24 supports using `jlink` to create a custom runtime image without the JDK's
JMOD files.
Rebuild the AOT cache when the application, class path, module path, or JDK
changes. The cache is tied to the inputs used to create it.
JDK 26 lets applications use ahead-of-time object caches with any garbage
collector, including ZGC.
### Generational Shenandoah and Graal
Generational Shenandoah is a product feature in JDK 25. Launch configurations
that used `-XX:+UnlockExperimentalVMOptions` solely to enable it can drop that
flag.
JDK 25 removes the optional experimental Graal JIT that shipped in some earlier
JDK builds.
### Flight Recorder profiling and tracing
JDK 25 adds experimental Flight Recorder CPU-time profiling on Linux.
Flight Recorder can instrument selected methods to measure execution times or
trace individual invocations.
## Kerberos cross-realm checks
JDK 27.0.1.1 validates the transited field of cross-realm Kerberos service tickets
that lack the `TRANSIT_POLICY_CHECKED` flag. It uses explicit paths from
`[capaths]` in `krb5.conf` when configured and falls back to the realm-name
hierarchy otherwise.
After assessing the security implications, you can disable the check by setting
the `sun.security.krb5.acceptor.checkTransitedPolicy` security property to
`false`. The JVM system property of the same name takes precedence over the
security property.
```text
-Dsun.security.krb5.acceptor.checkTransitedPolicy=false
```