I am using the load an appropriate SWT library dynamically using the code in here .
Method addUrlMethod = URLClassLoader.class.getDeclaredMethod("addURL", URL.class);
addUrlMethod.setAccessible(true);
....
URL swtFileUrl = new URL("rsrc:" + swtFileName);
addUrlMethod.invoke(classLoader, swtFileUrl);
Now just for experiment I change swt_win32_x86.jar file into an empty file. But line "addUrlMethod.invoke(classLoader, swtFileUrl);" does not throw any kind of exception.
Why is it so? And how can check whether the swtFileName is a valid SWT library file or not?