classloader
ClassLoader.getSystemResourceAsStream(className) returning null when trying to load class file resource
Class clazz = ...; InputStream is开发者_如何学运维 = ClassLoader.getSystemResourceAsStream(clazz.getName().replace(\'.\', \'/\') + \".class\");[详细]
2023-04-12 11:05 分类:问答Using custom WebAppClassloader in Jetty
I\'m writing a spring based web application for our company and I received orders that I should encrypt classes of our app.[详细]
2023-04-12 10:29 分类:问答Bundle.loadClass() returns Class instance without fields or methods
I want to create an OSGi framework programmatically, load a Bundle with it and load a class from that bundle. When I call Bundle.loadClass() I get a Class isntance with all fields\\methods\\constructo[详细]
2023-04-12 05:51 分类:问答What does "new" do in Java w.r.t. class loader?
I cannot easily find it in JLS/JVMSpec, nor in SO. I\'m sure it must\'ve been asked... So, what does \"new\" do actually? Suppose we instantiate a class B in A:[详细]
2023-04-11 17:37 分类:问答How to sandbox SLF4J
I have a an application (extension) running inside a Smartfox server. Most of you won\'t know Smartfox, but the setup is like Tomcat. i.e. the extension has its own classloader which loads classes fro[详细]
2023-04-11 17:04 分类:问答Java import, without CLASSPATH
I开发者_高级运维s there a way to import other classes in Java without adding them to the classpath? Something like \"import C:/dir/file.jar\"?You can\'t import a jar file just by changing the \"import[详细]
2023-04-11 15:08 分类:问答scala classloaders confusion
Please consider the following test program (using scala 2.9.0.1) object test { def main(args:Array[String]) = {[详细]
2023-04-10 21:15 分类:问答Building a project gave me java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader
While building project I am getting the following error: java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Documents and Settings/in[详细]
2023-04-10 02:00 分类:问答Loading Components/Classes into an ArrayList via some component Name Pattern
I have a number of classes of the same type (com.project.abc.abs.Agent) annotated like so; @Component(\"WEB.Agent-1\"), @Component(\"WEB.Agent-2\"), @Component(\"WEB.Agent-3\")... etc. For now assume[详细]
2023-04-09 18:37 分类:问答Custom MBean in Tomcat - cannot find javaURLContextFactory when creating InitialContext
I\'ve written a custom MBean that deploys in Tomcat 6. One of its tasks is to query a database value. I\'m doing this by loading up the database resource using JNDI - the resource is defined in Tomcat[详细]
2023-04-08 13:49 分类:问答