Java Class loading.

In my original Eclipse / Visual GDB version of my project, I had a few static Java classes to wrap various 3rd party libraries for calling from Native C++ code. I didn’t explicitly load these Java classes in my own code, but they all were available when I tried to find the class via JNI.

Now in the NSight Dev Studio project, none of these classes seem to be loaded and FindClass returns Null ,unless I first reference these static classes in my Java code. Is there any setting I can make / change to have the project behave as it did previously?


Hello Elton,

I have tried to reproduce the issue, but finding the nested static class from the C code works OK for me. Here’s my call (I have modified the Hello World Nsight Tegra sample):

jclass clazz = (*env)->FindClass(env, "com/example/hellojni/Static$S");

And the Java class:

public class Static
    public static class S {
        public static Integer X;

        static {
            X = 0;

If you haven’t resolved this problem yet, could you try calling ExceptionDescribe so the stack trace will be printed to the log?