Jinterface newbie question

Gordon Beaton not.for.email@REDACTED
Wed Nov 15 08:18:01 CET 2000

On 14 Nov 2000 18:08:37 GMT, Alexis Le-Quoc wrote:
> A question from a JInterface newbie... I'm trying to create a node in java
> using the following code:
> import com.ericsson.otp.erlang.*;
> public class NeomeoNode {
>     public static void main(String[] args) throws java.io.IOException {
>         OtpNode node = new OtpNode("node1", "neomeo");
>     }
> }
> It could hardly been made simpler but I think I'm missing something since
> I get a NullPointerException at line 613 of OtpNode.java.
> OtpNode.java:613 reads acceptor.start() where acceptor is a static
> Acceptor initialized to null. The weird thing is that line 613 is part of
> the Acceptor constructor... I'm trying to understand how:
> acceptor = new Acceptor() is supposed to work if the Acceptor constructor
> refers to a non-null reference to acceptor. A sort of chicken-and-egg
> problem. What am I missing here?

There is an error in the code, as was mentioned just yesterday on this
list. Change line 613 to read "this.start()" instead.


g o r d o n . b e a t o n @ e r i c s s o n . c o m
software architecture laboratory
ericsson research
stockholm, sweden

More information about the erlang-questions mailing list