PMD rule “Use Proper Class Loader” explaination?
There is the following PMD rule: Use Proper Class Loader (Critical) In J2EE getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. Can somewhat explain more what they are thinking of? What exactly means "J2EE" environment here? J2EE environment refers to the Java Enterprise Edition. Here, you do not run your program as a standalone application on the JVM, but instead, you let the JEE Application Server (e.g. Glassfish or Tomcat) to run it for you. Application Servers provide a lot of different ways to run your program, for example they offer