James
unread,Feb 22, 2012, 8:05:54 AM2/22/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jni4net
Hello,
I am trying to call a single method from my own Java API, which is in
a jar file (e.g. james.jar). Is it possible to do this by reflection,
using the proxies that come with jni4net, so that I don't have to
create proxies for the jar?
var bs = new BridgeSetup(false);
// location of james.jar and jni4net.j-0.8.6.0.jar
bs.AddAllJarsClassPath("C:\\Users\\james\\Desktop\\lib\\");
bs.AddAllJarsClassPath(".");
Bridge.CreateJVM(bs);
The above code completes normally, and I am able to print hello world:
java.lang.System.@out.println("Hello world")
However, if I do this:
java.lang.Class.forName("james.TestClass");
I get a ClassNotFoundException. So my question is: Does every class
used by the JVM require a proxy, or am I doing something wrong?
Thanks for any help.