-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Java has recently released new features that build on the CDS with the concept of Ahead of Time Class Linking and Method Profiling to enable faster startup and warmup of applications. These were implemented in JEP 483 and JEP 515 with more enhancements in development.
Currently in order to utilize an AOT cache that was generated from a training run the module path must be the same as the module path used in the training run. This means that directories cannot be included in the module path as java has no way of knowing that the files are the same.
Currently when an application is jlinked a module path reference to the app folder is added in the launch scripts. It is noted that the app folder is only populated when a custom image is used but the module path entry is always present. To help support the first steps towards including a usable aot file in the jlink image the path to module path entry of the app folder should only be included if a custom image is used.
This could also be extended to if the app folder is populated each included jar is listed individually so that the aot could be used even with a custom image.
Currently as a workaround I am supplying my own templates to the launcher script generation that remove the /app module path entry. This can be seen in the following files. https://github.com/FAForever/Neroxis-Map-Generator/pull/478/changes#diff-b56214ca831296b0ed5115fdb26ac175ca4ba3fb2a597a40344c79ae68d98172L35