jinterface and erlang node

Wed Feb 2 18:39:02 CET 2005


I'm prototyping an Erlang server which needs to connect with an existing Java client. For simplicity I'm using a simple 'echo' server. I converted a simplified Java client into an Erlang node using jinterface. Unfortunately at this point I am unable to send/receive messages from the Erlang server.

My Java code starts as:
node = new OtpNode("java_client");
mbox = node.createNode("client1");

// the following returns true
node.ping("server", 100);


The Erlang server is globally registered as 'echo_srv'.
If I do a net_adm:world() I see 'java_client@REDACTED' and I can net:ping it.

I also wrote an Erlang client which was successful in sending/receiving messages from 'echo_srv'.

How do I go about sending/receiving messages using jinterface ? 

The steps seem to involve creating a OtpErlangPid which requires a PID in external format (how can I get this) or from a node, id, serial, creation tuple (what are these, in particular id, serial, 
creation ?).

Any hints/code fragments are welcome. 



More information about the erlang-questions mailing list