java声音播放

import java.io.FileInputStream;
import java.io.IOException;

import sun.audio.AudioPlayer;

/**
* Description of the class
*
* @author Wangqy
* @version 1.0
* @since Aug 31, 2010
*/

public class Play
{
    private static String           file_path   = "E://atom//data//music//cailing//星月神话.wav";

    public static void main(String args[])
            throws IOException
    {
        AudioPlayer.player.start(new FileInputStream(file_path));
    }

}

你可能感兴趣的:(java声音播放)