Replace SystemClassLoader with the PlatformClassLoader

This ensures the bundler/deobfuscator can only see classes that are part
of the Java runtime, and not classes from the bundler/deobfuscator
themselves.

Signed-off-by: Graham <gpe@openrs2.dev>
feat/deob-ir
Graham 5 years ago
parent 8e0b480cfb
commit d4da4e2de3
  1. 2
      bundler/src/main/java/dev/openrs2/bundler/Bundler.kt
  2. 2
      deob/src/main/java/dev/openrs2/deob/Deobfuscator.kt

@ -44,7 +44,7 @@ class Bundler @Inject constructor(publicKeyTransformer: PublicKeyTransformer) {
val glClient = Library.readPack(input.resolve("runescape_gl.pack200"))
// bundle libraries together into a common classpath
val runtime = ClassLoader.getSystemClassLoader()
val runtime = ClassLoader.getPlatformClassLoader()
val classPath = ClassPath(
runtime,
dependencies = listOf(unpacker),

@ -88,7 +88,7 @@ class Deobfuscator(private val input: Path, private val output: Path) {
glUnpacker.remap(create(glUnpacker, "unpacker_"))
// bundle libraries together into a common classpath
val runtime = ClassLoader.getSystemClassLoader()
val runtime = ClassLoader.getPlatformClassLoader()
val classPath = ClassPath(
runtime,
dependencies = emptyList(),

Loading…
Cancel
Save