Re: NullPointerException in Socket

Shawn Silverman <[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Hi, Dennis.  It looks like you've forgotten to create the ServerSocket 
object:

	listenSocket = new ServerSocket(some_port);

Regards,
	-Shawn

On 3-May-04, at 5:46 AM, Denis Yakovlev wrote:

> Hi, All!
> Can you help me with folowed problem? May be I just have poor 
> knowledge in
> Java. So...
> The problem:
>  public ServerSocket listenSocket ;
>
> public void serveTini() {
>          Socket clientSocket;
>                 try{
>                         System.out.println("Point1");
>                         while(keepRunning){
>                                 System.out.println("DeadPoint");
>                                  clientSocket = listenSocket.accept(); 
> <----
>
>  at this point I have an error:
>
> java.lang.NullPointerException
>    in SockTiniTerm.serveTini(@JPC=b0010)
>       in java.lang.System.???
>
> What should I do? Is syntax correct? Anybody please help me
>
>
>
> -- 
> Best regards
> Denis Yakovlev,

_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.