T
timprepscius
Okay.. I'm having the following problem.. I've tried pretty much every
solution I can think of but always hit some brick wall.
I need to:
load classes from a jar in a unicode directory and register native
methods for those classes.
Before (the unicode) I was simply doing a -Djava.class.path=myjar.jar
And then registering the native methods..
But.. I can't find a way to send a unicode code string to through the
-Djava.class.path..
So I've tried:
1. sending the string as utf8.. nope.
2. setting environment variable classpath with
SetEnvironmentVariableW.. nope.
3. creating my own url class loader with the jar..
Loads fine.. BUT NATIVE METHODS DO NOT REGISTER CORRECTLY (even
though the jnienv says they do.. they don't.. apparently I can only
register native methods from classes loaded from the jnienv_ sucky..)
4. creating my own url class loader that loads the byte code directly
from the jar, then calls defineClass from the root class loader.
NOPE.. because classes reference each other.. therefore the entire
jar must be available when ever I reference one class.
5. found out the class Launcher and its methods getClassLoader,
appendblahblahfor instrumentation..
NOPE.. although.. I've sort of giving up now.. this is going too far.
--
Any help?
Surely there are some japanese programmers that have dealt with this
before.
-tim
solution I can think of but always hit some brick wall.
I need to:
load classes from a jar in a unicode directory and register native
methods for those classes.
Before (the unicode) I was simply doing a -Djava.class.path=myjar.jar
And then registering the native methods..
But.. I can't find a way to send a unicode code string to through the
-Djava.class.path..
So I've tried:
1. sending the string as utf8.. nope.
2. setting environment variable classpath with
SetEnvironmentVariableW.. nope.
3. creating my own url class loader with the jar..
Loads fine.. BUT NATIVE METHODS DO NOT REGISTER CORRECTLY (even
though the jnienv says they do.. they don't.. apparently I can only
register native methods from classes loaded from the jnienv_ sucky..)
4. creating my own url class loader that loads the byte code directly
from the jar, then calls defineClass from the root class loader.
NOPE.. because classes reference each other.. therefore the entire
jar must be available when ever I reference one class.
5. found out the class Launcher and its methods getClassLoader,
appendblahblahfor instrumentation..
NOPE.. although.. I've sort of giving up now.. this is going too far.
--
Any help?
Surely there are some japanese programmers that have dealt with this
before.
-tim