ClasspathCollector

Enumerate the real backing jars for net.minecraft.* at runtime, so the REPL can feed them to the Kotlin compiler as its classpath.

java.class.path does NOT contain the MC jar on a module-based loader — BootstrapLauncher deliberately ignores it and loads MC into the MC-BOOTSTRAP module layer. So we take a union (dedup by absolute path) of the five sources numbered below, and one of them always wins per loader.

Functions

Link copied to clipboard
private fun add(out: MutableSet<File>, f: File)
Link copied to clipboard
private fun addUri(out: MutableSet<File>, uri: URI)

Turn a module/codesource URI into a File — see JarLocator.

Link copied to clipboard
Link copied to clipboard
private fun collectLayer(layer: ModuleLayer?, out: MutableSet<File>, seen: MutableSet<ModuleLayer>, skipModule: String?)
Link copied to clipboard
private fun collectLoaderUrls(start: ClassLoader?, out: MutableSet<File>)
Link copied to clipboard
private fun log(m: String)