[
https://issues.apache.org/jira/browse/GROOVY-11978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077791#comment-18077791
]
Paul King commented on GROOVY-11978:
------------------------------------
I think this was a little too optimistic. I am reworking the solution.
> RootLoader duplicates the core jar already on the bootstrap classpath
> ---------------------------------------------------------------------
>
> Key: GROOVY-11978
> URL: https://issues.apache.org/jira/browse/GROOVY-11978
> Project: Groovy
> Issue Type: Improvement
> Reporter: Paul King
> Assignee: Paul King
> Priority: Major
>
> The launcher script puts {{groovy-x.y.z.jar}} on the JVM bootstrap
> {{-classpath}} so that {{GroovyStarter}} can run. {{GroovyStarter}} then
> reads {{groovy-starter.conf}}, whose {{load !\{groovy.home}/lib/*.jar}} glob
> picks up the same core jar again and adds it to the {{RootLoader}}.
> The result is that every core class is reachable via two defining loaders
> (the system classloader and the {{RootLoader}}), and
> {{ClassLoader.getResources}} returns the core jar twice. This trips the
> duplicate-module check in {{MetaClassRegistryImpl}}, which logs a warning on
> every standard launch listing the same jar URL twice.
> The fix is to skip URLs already on {{java.class.path}} when populating the
> {{RootLoader}} from a {{LoaderConfiguration}}, so core classes are owned by
> the system classloader and module/grab jars are owned by the {{RootLoader}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)