On Sun, 27 Sep 2026 10:47:59 GMT, Yunbo Zhang <[email protected]> wrote:

>> Problem:
>> 
>> When `-bootclasspath` is specified, javap still searches `SYSTEM_MODULES` 
>> before `PLATFORM_CLASS_PATH`. Therefore, system classes such as 
>> `java.lang.Object` are loaded from the current JDK instead of the specified 
>> boot class path.
>> 
>> Fix:
>> 
>> When a boot class path is explicitly specified, skip the `SYSTEM_MODULES` 
>> lookup. The existing behavior remains unchanged otherwise.
>> 
>> Testing:
>> 
>> - Added regression coverage for all three boot class path option forms: 
>> `-bootclasspath`, `--boot-class-path`, and `--boot-class-path=<path>`.
>> - `make test TEST=test/langtools/tools/javap`: 87 passed, 1 excluded, 0 
>> failed.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Yunbo Zhang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8354563: Remove personal copyright line from javap test

The current patch makes `javap` honor `-bootclasspath` by skipping the 
system-module lookup for class names in `JavapTask`

Jonathan suggested in 
[JDK-8354563](https://bugs.openjdk.org/browse/JDK-8354563) that mixing 
module-oriented and package-oriented options should be an error. Should `javap` 
reject this combination? Separately, is `JavapTask` the right place for the 
lookup fix, or should it be handled by the file manager?

I can update the patch and tests accordingly

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

PR Comment: https://git.openjdk.org/jdk/pull/32554#issuecomment-5855340122

Reply via email to