On Wed, 29 Jul 2026 14:40:52 GMT, Matias Saavedra Silva <[email protected]> 
wrote:

> When performing an AOT training run using a multi-release JAR file, the 
> following warning can be encountered:
> `[warning][aot] class org/example/Foo cannot be archived because it was not 
> defined from <path to mr.jar> as claimed`
> This warning results from a specific configuration of the JAR file where the 
> class is not in the root directory but is present in the versioned directory 
> `META-INF/version`. To fix this, an upcall to ClassLoader.getResource() is 
> now made in the specific case where a multi-release JAR is being used and the 
> class cannot be found through normal means. Verified with tier 1-5 tests.
> 
> 
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 5edeb162
Author:    Matias Saavedra Silva <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/5edeb1620cfed06b2cab1f4e31f4f1e2b648a44d
Stats:     194 lines in 8 files changed: 175 ins; 2 del; 17 mod

8380847: Versioned class loaded from multi-release jar file is not cached

Reviewed-by: iklam, alanb, coleenp

-------------

PR: https://git.openjdk.org/jdk/pull/32087

Reply via email to