Hi,
I want to use UDP in
applet. below is the part code of the applet. It compiles fine and while running it throws NullPointerException at clientSocket.send(datagram); line.
DatagramSocketclientSocket;
DatagramPacketdatagram;
System.out.println( "Connecting to Server ..." );
destination=InetAddress.getByName("rhanda");
// msg here are byte array object
datagram=new DatagramPacket(msg,msg.length,destination , 5001);
clientSocket.send(datagram);
Can we use DatagramSocket in applets if can then what can be the reason for giving its NullPointerException.
sooner replies will be highly appriciated.
regards,
Ramneek Handa.