Top "Classloader" questions

A class loader is an object that is responsible for loading classes in Java.

cast across classloader?

How can I do this: class Foo { public static Foo get() throws Exception { ClassLoader cl = new URLClassLoader(new URL[]{"foo.…

java classloader
Java ASM Bytecode Modification-Changing method bodies

I have a method of a class in a jar whose body I want to exchange with my own. In …

java classloader code-injection bytecode java-bytecode-asm
How do I make Weblogic 10 prefer the jars in myApp.war:/WEB-INF/lib/ without throwing VerifyErrors?

The Weblogic classloader seems to prefer system libraries over the libraries in my war's WEB-INF/lib/. I've tried setting the …

java weblogic classloader web-inf
Java 9, compatability issue with ClassLoader.getSystemClassLoader

The following code adds jar file to the build path, it works fine with Java 8. However, it throws exception with …

java classloader java-9 urlclassloader
java.lang.LinkageError: ClassCastException

I do experience a really annoying problem with TestNG and RESTeasy. I do have a class that runs several tests …

java classloader testng mockito powermock
Use native Java SE 6 JAX-WS implementation instead of JBoss WS stack

JBoss 6.0 Final is shipped with JBoss WS (Apache CXF stack by default), I know that I can replace the default …

java jax-ws jboss6.x classloader jbossws
Load class within Jar file and get it's path

I know there are already a lot similar questions here, but I couldn't get any smarter form them. I want …

java plugins jar classloader urlclassloader
Android: "Class loader may fail for processes that host multiple applications"

What does this message in Eclipse's logcat for Android mean? W/ActivityThread: ClassLoader.getResources: The class loader returned by Thread.…

android multithreading classloader
Classloading Using Different Versions Of The Same Class : java.lang.LinkageError : attempted duplicate class definition for name

I have a working code that loads dynamically different Class Implementations with different Class Names. The class files are loaded …

java jvm classloader linkageerror
How to prevent xalan.jar that has META-INF\services\javax.xml.transform.TransformerFactory from taking over JDK 1.6 built in Xalan implementation?

Consider this code (based entirely on flying saucer's "getting started" code, their rights reserved): package flyingsaucerpdf; import java.io.File; …

java xerces classloader xalan