[erlang-questions] Jinterface

Vlad Dumitrescu <>
Fri Sep 23 11:44:31 CEST 2011


Hi,

On Fri, Sep 23, 2011 at 11:23, Amir Almasi <> wrote:
> I am currently working on GUI by using Jinterface. I am try to send a
> message from an alive node made by Jinterface library in java to the alive
> normal node on shell.
> In this way it works and another module gets the message:
> OtpErlangAtom ok = new OtpErlangAtom("ok");
> mbox.send("clientChat", "chat_c@" + computername, ok);
> The problem is, I need to pass the node() by message for the reply.
> Therefore, I call the function in this way, and there will be error
> notification!,
> OtpNode myNode = new OtpNode("bar");
> mbox.send("clientChat", "chat_c@" + computername, myNode );
> or
> OtpNode myNode = new OtpNode("bar");
> mbox.send("clientChat", "chat_c@" + computername, myNode.node() );
> Is there any hint or solution??

You don't have to send the node, but the pid of a mailbox to receive
the answer (could be any mailbox).
For example,
mbox.send("clientChat", "chat_c@" + computername, mbox.self() );

regards,
Vlad



More information about the erlang-questions mailing list