Skip searching for mods in the JAVA_HOME directory. Closes #2249 and #2250

This commit is contained in:
LexManos 2016-08-13 13:28:21 -07:00
parent 20c662c1d0
commit 3a48a9cd73

View file

@ -103,6 +103,8 @@ public class ModClassLoader extends URLClassLoader
public boolean isDefaultLibrary(File file)
{
String home = System.getProperty("java.home"); // Nullcheck just in case some JVM decides to be stupid
if (home != null && file.getAbsolutePath().startsWith(home)) return true;
// Should really pull this from the json somehow, but we dont have that at runtime.
String name = file.getName();
if (!name.endsWith(".jar")) return false;