组播加入总是失败,就是那个joingroup()方法
我是win7系统 xp下没试过
我想做一个语音群聊 几个宿舍的人打dota用
现在用普通的udp DatagramSocket 点对点成功 就是组播这里有问题
qq:471748942
期待高手帮助下面是发送线程的代码   
package yuyin3;import java.io.*;import javax.sound.sampled.*;import java.net.*;class Capture implements Runnable {TargetDataLine line;
Thread thread;
DatagramSocket s;
DatagramPacket p;Capture(DatagramSocket s) {// 构造器 取得socket以获得网络输出流
this.s = s;
}public void start() {thread = new Thread(this);
thread.setName("Capture");
thread.start();
}public void stop() {
thread = null;
}public void run() {
AudioFormat format = new AudioFormat(8000, 16, 2, true, true);
DataLine.Info info = new DataLine.Info(TargetDataLine.class, format);try {
line = (TargetDataLine) AudioSystem.getLine(info);
line.open(format, line.getBufferSize());
} catch (Exception ex) {
return;
}byte[] data = new byte[1024];
int numBytesRead = 0;
line.start();
    
while (thread != null) {
numBytesRead = line.read(data, 0, 1024);try {
p=new DatagramPacket(data, 0, numBytesRead,new InetSocketAddress("192.168.137.1",5554));
} catch (SocketException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
s.send(p);// 发送
} catch (Exception ex) {
break;
}
}line.stop();
line.close();
line = null;}public static void main(String args[]) {
DatagramSocket s = null;
try {
s = new DatagramSocket(5555);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
new Capture(s).start();
}
}