0

I was looking around and I found a few answers that use ClassLoader.findLoadedClass(String className) but they all require overriding the permissions with setAccessible(boolean flag), and that just seems like you shouldn't be doing that. (What's the point of permissions anyway if you can just change them in runtime).

is there any other way to see whether or not a classes is loaded? This seems like it would be a pretty basic thing to check.

Thomas
  • 871
  • 2
  • 8
  • 21
  • The concept of permissions still work :p You just have permission to change permissions. – keyser May 24 '14 at 21:24
  • Why do you need to do that? The access is restricted for a reason. You should not depend on the internal state of class loader. If you do, your code will work differently, depending on who previously used this class loader. – Piotr Praszmo May 24 '14 at 21:30

0 Answers0