classloader
What will cause a Java class to be initialized?
I am using the Wrapper Class method to allow me to handle a class either existing or not. When using this technique, it is important to know what will cause my Proxy class to be initialized. In partic[详细]
2023-03-30 17:04 分类:问答Class loading behaviour when using Byte.class
When I have a lot of type checks in Java like this: if (clazz.equals(Byte.class) <dosomethin开发者_开发技巧g>[详细]
2023-03-30 15:45 分类:问答Loading serialized classes
What is the easiest way to load a class that has been serialized using the standard Jav开发者_StackOverflow社区a Serialization API?[详细]
2023-03-30 11:03 分类:问答Compiling classes with Toolprovider and loading them with ClassLoader
I\'m开发者_运维技巧 trying to load classes that I generate an compile in runtime. I can compile them without no problem with this code:[详细]
2023-03-30 10:53 分类:问答Implementing ClassLoader.getResource(String) without a protocol handler
My class loader resolves resources to a source that does not have a url handler eg it gets resources from a database. This of course poses a problem for ClassLoader.getResource(String) which returns a[详细]
2023-03-29 22:07 分类:问答Decide on runtime which library needs to be used on JBoss
is there a way to decide during runtime, which class from which jar (deployed on jboss) will be used?[详细]
2023-03-29 05:49 分类:问答Java - Custom ClassLoader - trying to load a class using class file full path
As part of an HTTP WebServer project for academic purposes, I\'m trying write my own custom class loader for web application classes, but can\'t seem to get it right.[详细]
2023-03-29 04:52 分类:问答Solution for the ClassCastException due to ClassLoader issue
I have two ClassLoaders which loads the same class. So, obviously these can\'t cast to one another. But I need to access an object created in the other ClassLoader.[详细]
2023-03-28 21:22 分类:问答Java ServiceLoader with multiple Classloaders
What are the best practices for using ServiceLoader in an Environment with multiple ClassLoaders? The documentation recommends to create and save a single service instance at initialization:[详细]
2023-03-28 04:35 分类:问答When is an object declared and initialized in a local reference created in Java?
If I have the following code: public class Foo { private Object obj = new Object(); public void bar() { final Object obj2 = new Object();[详细]
2023-03-27 18:32 分类:问答