Not the invocation API, this time. I have finally given
up on that one. One last thing I tried is:
- a top level Java class, with one native method Main(),
and a loadLibrary call
- all the legacy C code dumped into a DLL,
Main() implementation added
Instead of using the Invocation API, I now use
the JNIEnv* provided by JNI in Main() and use that
environment to let my native code set up various
other stuff. E.g. a native "init()" loads a couple
of other classes used only in native code.
Again, JDK seems to fail me. The very same classpath
that works to load the main Java class (import/javac)
does not work when I call env->FindClass in the
native code. The same source works with Japhar
(unfortunately, Japhar has other problems).
The error appears in 1.1.5 and 1.1.6v3. I rigged up
a test program, available on demand. I can load classes
that are not in packages, from the directories set
in the classpath (invocation API or bin/java). I can't
load a class that is in a package (below the root
directory), from inside a native method implementation.
If somebody has an idea what's going wrong here, I'd
appreciate a line.
b.
Btw., the classpath default is still a useless
/../../../classes:/../../classes.zip:/../../classes.jar:
/../../rt.jar:/../../i18n.jar in the Invocation.
Whether the Invocation sets a path or not, it should
at least be a useful or an empty one.