applet 播放au问题
import java.applet.*;import java.awt.*;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
public class myapplet extends Applet {
public void paint(Graphics g)
{
super.paint(g);
g.drawString("hello", 10, 10);
g.drawString("why can not play", 0, 20);
}
public static void main(String[] args) throws MalformedURLException
{
URL url= new URL("F:\\eclipse file\\applet\\春泥.au");
AudioClip once;
myapplet alet = new myapplet();
once = alet.getAudioClip(url);
once.loop();
alet.play(url);
}
}
用file对象来证明文件路径正确;但是运行该文件却没有声音,求解疑,,
补充:Java , Java SE