From: Kumar Appaiah Date: Fri, 30 Aug 2024 10:50:53 +0000 Subject: Ensure that the JNI interface is loaded Forwarded: not-needed =================================================================== --- src/magick/Magick.java | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/magick/Magick.java b/src/magick/Magick.java index ab78a0e..38be099 100644 --- a/src/magick/Magick.java +++ b/src/magick/Magick.java @@ -15,31 +15,7 @@ import java.awt.Rectangle; public class Magick { static { - String bprop = System.getProperty("jmagick.usingbundledlib"); - if (!"yes".equalsIgnoreCase(bprop)) { - String clprop = System.getProperty("jmagick.systemclassloader"); - if (clprop == null || clprop.equalsIgnoreCase("yes")) { - try { - Magick.class.getClassLoader() // previously: ClassLoader.getSystemClassLoader() - see https://github.com/techblue/jmagick/issues/49 - .loadClass("magick.MagickLoader").newInstance(); - } - catch(ClassNotFoundException e) { - throw new RuntimeException("Can't load MagickLoader " + - "(class not found)"); - } - catch(IllegalAccessException e) { - throw new RuntimeException("Access to SystemClassLoader "+ - "denied (IllegalAccessException)"); - } - catch(InstantiationException e) { - throw new RuntimeException("Can't instantiate MagicLoader " + - "(InstantiationException)"); - } - } - else { - System.loadLibrary("JMagick"); - } - } + System.loadLibrary("JMagick"); init(); }