Problems with seemingly trivial JNI

Rather than replace the main activity, I just want to add a java class that has java methods that I would like to call from C++.

So, I added a file Source/java/com/pei/myclass.java. In here is a class called myclass with some methods in it. I have a package line at the top

package com.pei;

In Projucer, I’ve added this java folder to the Android exporter’s Java source code folders.

In my Projucer project, I’ve added the file under Source. Do I have to recreate the folder structure here? I’ve tried a couple different ways, but assume the structure on disk is what is most important.

On the C++ side, I am just trying to do:

JNIEnv *env = juce::getEnv();
jclass a_class = (env->FindClass(“com/pei$myclass”));

But it returns NULL.

As you have probably surmised, I am both rusty at Java and have a shaky understanding of how java is added to JUCE as most examples are for replacing the main activity.

Thanks!