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-nevaberry-plugins)
---
name: java-knowledge-patch
description: Java
version: "27.0.1.1"
license: MIT
metadata:
author: Nevaberry
---
# Java Knowledge Patch
Load this skill when updating Java applications, launch configurations, build
scripts, runtime images, monitoring, or security configuration. It covers
compatibility changes and the language, API, runtime, and security features
described in the references below.
## Reference index
| Reference | Topics |
| --- | --- |
| [Language, APIs, and Concurrency](references/language-apis.md) | Compact source files, module imports, lazy constants, HTTP/3, datagram sockets, thread cancellation |
| [Migration, Removals, and Deprecations](references/migration-removals.md) | Launcher and VM options, desktop and platform support, locales, removed tools and APIs, JMX compatibility |
| [Runtime, GC, AOT, and Diagnostics](references/runtime-performance.md) | Runtime linking, memory-access warnings, final-field mutation, Shenandoah, AOT caches, Flight Recorder, performance monitoring, Graal JIT removal |
| [Security and Cryptography](references/security-cryptography.md) | JNDI, PEM, trust-store roots, key factories, algorithm requirements, Kerberos transited-field checks |
## Removals and migration
### Thread cancellation
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.
### Datagram socket construction
JDK 25 removes the ability to create datagram sockets through `java.net.Socket`
constructors. Use `DatagramSocket` or `DatagramChannel`.
### Removed launch options
Remove `-t`, `-tm`, `-Xfuture`, `-checksource`, `-cs`, and `-noasyncgc` from launch
configurations when upgrading to JDK 24.
### JNDI remote loading
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.
### Scripts and JMX descriptors
JDK 26 removes `jrunscript`. Replace invocations in build and deployment scripts
before upgrading.
JDK 26 removes XML interchange through JMX `DescriptorSupport`.
Update code that reads or writes descriptors as XML.
### Performance monitoring
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 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 them
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.
### Cryptographic providers
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.
## Deprecations and runtime warnings
### Launcher aliases
JDK 24 deprecates `-verbosegc`, `-noclassgc`, `-verify`, `-verifyremote`, `-ss`,
`-ms`, and `-mx` for removal.
### VM options
JDK 26 deprecates `Xmaxjitcodesize`, `AlwaysActAsServerClassMachine`,
`NeverActAsServerClassMachine`, `AggressiveHeap`, and `MaxRAM` for removal.
Review configurations that set these options.
In JDK 25, the explicit `UseCompressedClassPointers` VM option is deprecated
for removal. Let the VM choose whether to use compressed class pointers.
### Unsafe memory access
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 and
`--illegal-final-field-mutation` to control how the runtime handles mutations
made without that permission.
## Language and API use
### Compact source files
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.
### Preview lazy constants
In JDK 26, 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
`java.net.http.HttpClient` supports HTTP/3 as a permanent API feature in JDK 26.
Keep fallback available where appropriate because HTTP/3 selection depends on
server support, network reachability, TLS and QUIC configuration, and client policy.
### Preview PEM API
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 images, caches, and diagnostics
### Runtime linking
JDK 24 adds support for using `jlink` to create a custom runtime image without
the JDK's JMOD files.
### Generational Shenandoah
Generational Shenandoah is a product feature in JDK 25. Launch configurations
that used `-XX:+UnlockExperimentalVMOptions` solely to enable it can drop that flag.
### AOT caches
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.
### Flight Recorder
JDK 25 adds experimental CPU-time profiling on Linux.
Flight Recorder can also instrument selected methods to measure execution
times or trace individual invocations.
## Kerberos cross-realm validation
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
```