I have a class. It has 2 variables pointing to the class.

public class GetMe { public static GetMe INSTANCE; public static NewClassLoader classLoader; public GetMe(){ INSTANCE = new GetMe(); classLoader = new NewClassLoader(); } ... } 

I ship JavaAgent to the JVM and get the Field from the GetMe class.
How do I get the class to which the variable points? Those. We INSTANCE , then we get classLoader from INSTANCE . How to release it? (Through reflection).

    1 answer 1

    Try this:

    INSTANSE.getClass().getName();

    • In this case, the class is java.lang.reflect.Field. - NanoN
    • @NanoN, right, you need to get the same class - redL1ne