diff options
Diffstat (limited to 'src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java')
-rw-r--r-- | src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java b/src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java index 09f2368..6cc21e9 100644 --- a/src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java +++ b/src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java @@ -1,6 +1,7 @@ package moe.nea.modernjava.launch.util; import net.minecraft.launchwrapper.Launch; +import net.minecraft.launchwrapper.LaunchClassLoader; import java.io.File; import java.lang.reflect.Method; @@ -8,7 +9,10 @@ import java.net.MalformedURLException; import java.net.URL; public class ClassLoaderManipulations { - + /** + * Adds a File to the parent class loader of the launch class loader. Necessary if you want to/have to use + * {@link LaunchClassLoader#addClassLoaderExclusion(String)}. + */ public static void addToParentClassLoader(File file) { try { addToParentClassLoader(file.toURI().toURL()); @@ -17,6 +21,10 @@ public class ClassLoaderManipulations { } } + /** + * Adds a URL to the parent class loader of the launch class loader. Necessary if you want to/have to use + * {@link LaunchClassLoader#addClassLoaderExclusion(String)}. + */ public static void addToParentClassLoader(URL file) { try { Launch.classLoader.addURL(file); |