Building/distributing more than one VM in a single JDK distribution

Aleksey Shipilev shipilev at amazon.de
Tue Mar 11 17:11:11 UTC 2025


Hi Magnus,

On 11.03.25 11:53, Magnus Ihse Bursie wrote:
> Hence, I see no need anymore to keep the ability to build more than one
> variant of Hotspot at the same time. I propose we drop this
> functionality, which will allow for us to clean up and remove a lot of
> complexity in several areas of the codebase. (Just to be clear: I do not
> propose removing zero or minimal, I'm just saying that you need to build
> *only* the zero or minimal JVM if that is what you want.)
> 
> Feedback, thoughts?

For the multi-variant bundle:

I vaguely remember Debian folks building the VM that carried both Server and Zero in the same 
bundle. Matthias Klose showed me some of the scripts and related build errors. I cannot recall the 
reason for this.

For the multi-JVM bundle:

Multi-JVM bundles have a place in the world. You can currently frankenstein such a bundle from 
several JDK builds from the exact same source. The build support for them would be nice, and I would 
have thought the current multi-variant build support would serve as stepping stone towards it. I 
have not explored this in current build system at all, though -- so maybe you already know the 
answer to this from maintainability perspective. "Too hard, keep frankensteining them" is the 
acceptable answer :)

I know two use cases for multi-JVM bundles:

1. Shipping fastdebug JVM along with release JVM in the same bundle. This allows users to quickly 
select assertions-rich or non-optimized JVM for debugging sessions, with a flip of the command line 
switch, like -fastdebug / -slowdebug. See for example: https://builds.shipilev.net/openjdk-jdk/

2. Shipping completely different JVM in the same bundle. I believe this is how Espresso/Truffle does 
it with -server / -truffle. See: https://www.graalvm.org/latest/reference-manual/espresso/

Thanks,
-Aleksey


More information about the jdk-dev mailing list