Bind a C# method to a Java Method
Brought to you by:
jfrijters
Hi
I have a jar file that contains classes and methods that returns null.
This jar file uses as API for developing Java Applications.
I want force IKVM to run my C# methods instead of Java methods that returns null, But I don't know how.
I used URLClassLoader in C# to load the Java Application and the jar file, but when run application I get a NullReferenceException cause of the API methods return null.
In a easier way, the Jar File contains definations of methods and I want implement them in C#.
Like this:
// Java Class:
public static Foo GetFoo(Bar bar) {
return null;
}
// C#:
[BindToJava("com.java.Class.GetFoo")]
public static Foo GetFoo(Bar bar) {
return Foo.create(bar);
}
Anybody can answer ? Is it possible? I'm waiting for an