classloader Questions
5
Solved
JBoss7: loader constraint violation with ReastEasy and httpclient with custom HttpRequestInterceptor
I'm using the RestEasy Client Framework in a @Named @ViewScoped Bean with JBoss-7.1.1-Final to retrieve data from a REST service with a custom HttpRequestInterceptor:
RegisterBuiltin.register(Rest...
Precast asked 15/5, 2012 at 10:34
3
Solved
My build script is encountering an error (below). Is there a way to run Gradle with the same type of output as invoking Java with -verbose:class?
The error in question, should anyone have some inp...
Fagoting asked 22/3, 2013 at 19:6
12
Solved
I've got an interesting problem in which the org.apache.log4j.Logger class is not found during runtime. I'm trying to get authorized and that is where it's failing:
OAuthAuthorizer oauthAuthorizer...
Betulaceous asked 3/1, 2014 at 17:34
1
I've got a class in which I do some runtime annotation scanning, but it uses the deprecated DexFile APIs which causes a warning to appear in LogCat:
W/zygote64: Opening an oat file without a cla...
Cyst asked 1/5, 2018 at 16:36
4
Solved
I have an enum with a list of states (e.g.)
enum State
{
UP,
DOWN,
RETRY
};
The column in my database is of type enum. When I try to execute a Hibernate query by setting the parameter in the ...
Aspirin asked 23/12, 2014 at 14:9
13
Solved
Recently I switched to the Java 11 and start to debug my app and saw this message:
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot
loader classes because bootstrap classpat...
Occam asked 15/1, 2019 at 19:18
9
The following code adds jar file to the build path, it works fine with Java 8. However, it throws exception with Java 9, the exception is related to the cast to URLClassLoader. Any ideas how this c...
Melancholic asked 11/10, 2017 at 17:51
21
Solved
Why is it so hard to do this in Java? If you want to have any kind of module system you need to be able to load JAR files dynamically. I'm told there's a way of doing it by writing your own ClassLo...
Anguish asked 13/9, 2008 at 18:48
2
Solved
If I use
try {
Class.forName("my.package.Foo");
// it exists on the classpath
} catch(ClassNotFoundException e) {
// it does not exist on the classpath
}
the static initializer block of "F...
Bismuthous asked 12/8, 2010 at 10:6
2
Solved
I'm making a maven plugin that run in test phase, in pom.xml configuration of a project that uses my plugin, I'm setting a class canonical name that I want to use to run that class from my plugin, ...
Virgilvirgilia asked 9/4, 2018 at 16:39
4
After installing jdk9 I have been seeing this problem:
$hive
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
SLF4J: Class path contains multiple ...
Medor asked 20/12, 2017 at 1:40
1
Solved
Let's assume, we're using OpenJDK 20. The official documentation says:
The platform class loader is responsible for loading the platform classes. Platform classes include Java SE platform APIs, th...
Bleeding asked 16/7, 2023 at 17:49
3
Solved
I am trying to list the order in which the Java class loader is loading my classes. if I use -verbose parameter it will list every single interface/class it loads, including tons of interfaces such...
Sharondasharos asked 19/4, 2012 at 14:27
4
Solved
In a module structure like this:
project
|
|- common module
|- app module
Where app module has common module as a dependency, I have a custom classloader class defined in the common module. The app...
Decrescendo asked 16/10, 2020 at 11:34
15
Solved
I want to write a Spek test in Kotlin.
How to read an HTML file from the src/test/resources folder?
class MySpec : Spek(
{
describe("blah blah") {
given("blah blah") {
var f...
Yusuk asked 11/3, 2017 at 19:45
13
Solved
I have a JAR file and I need to get the name of all classes inside this JAR file. How can I do that?
I googled it and saw something about JarFile or Java ClassLoader but I have no idea how to do i...
Marcheshvan asked 30/3, 2013 at 16:30
7
Solved
I would like to create a parent-last / child-first class loader, e.g. a class loader that will look for classes in the child class loder first, and only then delegate to it's parent ClassLoader to ...
Schreiner asked 26/3, 2011 at 21:40
5
Solved
If I have a Class instance at runtime, can I get its byte[] representation? The bytes I'm interested in would be in the Class file format, such that they'd be valid input to [ClassLoader.defineClas...
Spumescent asked 10/1, 2010 at 4:42
12
Solved
Does anyone know how to programmaticly find out where the java classloader actually loads the class from?
I often work on large projects where the classpath gets very long and manual searching is...
Oster asked 22/10, 2008 at 20:44
8
Solved
I have read a lot about the Java class loading process lately. Often I came across texts that claimed that it is not possible to add classes to the classpath during runtime and load them without cl...
Fussy asked 31/5, 2010 at 9:16
1
Solved
My experience with Java class loading is limited. With tools like Maven I have a rusty understanding of how they resolve dependency versions. But I've hit a problem that's making me question how Ja...
Gobbet asked 22/11, 2022 at 20:53
3
Solved
I'm trying to get an annotation from a method but I'm having some trouble. What I'm doing is loading a jar file using URLClassLoader, then I'm inspecting the annotations on methods in classes in th...
Mercantile asked 27/5, 2015 at 0:9
9
Solved
I've got some code that calls..
x = getClass().getClassLoader();
This returns null though.
When I start the same code not from Eclipse, but the command line, it returns a classloader.
I can ha...
Irrevocable asked 17/12, 2009 at 11:52
4
What I understand is that if I use:
Instrumentation#getAllLoadedClasses()
I do get a selection of all loaded classes by the target JVM. But If I do:
Class.forName("my.class.name")
This will no...
Teetotalism asked 2/10, 2017 at 9:38
3
Solved
I am not clear on the following:
A class is loaded by JVM when needed, like lazy initialization, right?
Now if class A does an import of class B which class B actually is not in the file system (e....
Auria asked 26/9, 2012 at 7:19
1 Next >
© 2022 - 2024 — McMap. All rights reserved.