I've two classes:
public class UThreadApp {
public static void main(String[] args) {
newUThread("umain", args);
...
}
native void newUThread(String method, String[] args);
}
public class App extends UThreadApp {
public static void umain(String[] args) {
...
}
}
Application is executed as java App
.
App
inherits main
from UThreadApp
such that main
calls App.umain
. I've to get programmatically the main class name App
from Java or JNI so as to call App.umain
from JNI code. Do you see a way to do that?
Idioms such that new Object(){}.getClass().getEnclosingClass()
don't work since they return UThreadApp
.