classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Classloaders & JNI FindClass


From: Andrew Haley
Subject: Re: Classloaders & JNI FindClass
Date: Tue, 22 Feb 2005 17:16:14 +0000

Peter Werno writes:
 > Hello everyone,
 > 
 > As I'm approaching the next release of the JAmiga VM, I have a little
 > problem regarding classloaders in connection with the JNI FindClass
 > method.
 > 
 > What is the "correct" method to determine the current class loader for
 > FindClass? Or will FindClass always only use the system class loader?
 > 
 > Here is an example:
 > 
 > Method I from class A (loaded by system classloader) calls method II
 > Method II from class B (loaded by a different classloader) calls method III
 > Method III from class C (loaded by the system classloader again) now calls
 > a native method IV
 > Native method IV calls FindClass ... which classloader is used (and why :) )?

It shouldn't behave any differently from a Java method in the class in
which it is declared.

Andrew.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]