The only free tool I could find on the net to call a com object from java is com4j.
With such tool, I did run a command against your tlb definition (ninjiatrader.client.tlb) and got some usable java proxy to call your client, attaching them to the post.
This is the sourcecode I am using to call your interface from java:
public static void main(String[] args) { _Client comObj = ClassFactory.createClient(); IClient ntClient = comObj.queryInterface(IClient.class); int ret = ntClient.connected(0); System.out.println(ret); }
I wondered if this could be a "safe" way to interop with your interface or would you suggest anything else? I could do everything in C# but I lose years and years of java exp, that'd be silly...
Comment