Skip to content
Discussion options

You must be logged in to vote

To follow up on @simonis question, by making jdk.internal.loader.ClassLoaders, initialize-at-run-time, its static initializer at image-runtime executes https://github.com/openjdk/jdk/blob/847b5166ea6322f9ff3effa62ed6d1e73a8b1122/src/java.base/share/classes/jdk/internal/loader/ClassLoaders.java#L94

URLClassPath ucp = new URLClassPath(cp, false);
if (archivedClassLoaders != null) {
    APP_LOADER = (AppClassLoader) archivedClassLoaders.appLoader();
    setArchivedServicesCatalog(APP_LOADER);
    APP_LOADER.setClassPath(ucp);
} else { /* unreachable */ }

and this is how the NI built-in APP_LOADER instance actualizes its classpath with what is coming from the java-launcher.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by olpaw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants