Java: How to get access to ClassLoader from static function

If you need access to the ClassLoader from a static function, for example in order to access a file inside your jar. You can get hold of it simply bu calling “YourClassname.class.getClassLoader():)

Leave a Reply