DarkNotes icon indicating copy to clipboard operation
DarkNotes copied to clipboard

Sample request: Calling methods with arguments

Open redcodelabs opened this issue 10 years ago • 1 comments

Hi,

Thanks for sharing the lib with us. Could you post a small sample of a method call in Java from .Net ?

Thanks!

redcodelabs avatar Nov 07 '14 15:11 redcodelabs

if you mean not callbacks like load C# DLL in java then you need search google for "Calling C# dll from Java"

if you want to just call methods of java class you just call them but you first need to add your jars to classpath https://github.com/shimondoodkin/DarkNotes/blob/master/some-messy-code-maybe-useful.cs

if you mean like callback like if you run a jvm in c# then start your java then give your java a c# callback class then I am not sure if it is implemented

if anyone want to implement it callbacks in java are abstract classes like Runnable (create your abstract class: http://stackoverflow.com/a/18546189/466363) to me this lib seems like a hack, something between java reflection and jni, using c#. so you need to think like jni and maybe also java reflection. maybe might help or not help: search google: "jni override method" Class.asSubclass http://www.tutorialspoint.com/java/lang/class_assubclass.htm search google: "jni runnable" http://stackoverflow.com/questions/11616362/interface-java-with-c-timer-library-using-jni search google: "jni implement abstract" then write it in c#

shimondoodkin avatar Jan 31 '16 10:01 shimondoodkin