Question: I want to play the `mp3` file in `java`. I am using a code but show the exception could not get audio input stream from input file. 
My source code is :

```
try {
        System.out.println("Start");
        File f = new File("E:\\malayalam good song\\01_ISHTAMANU.MP3");

        AudioInputStream audio = AudioSystem.getAudioInputStream(f);
        System.out.println("Start");
        AudioFormat format = audio.getFormat();
        DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);
        SourceDataLine  auline = (SourceDataLine) AudioSystem.getLine(info);
        auline.open(format);
        auline.start();
        int nBytesRead = 0;
        byte[] abData = new byte[524288];
        while (nBytesRead != -1) {
            nBytesRead = audio.read(abData, 0, abData.length);
            if (nBytesRead >= 0) {
                auline.write(abData, 0, nBytesRead);
            }
        }
    } catch (Exception E) {
        System.out.println("Exception"+E.getMessage());
    }

```

Answer: 
If you are on `java 7`, there are new (`JavaFX`) classes there that are easier to use:

```
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
...
...

try {
        File f = new File("E:\\malayalam good song\\01_ISHTAMANU.MP3");
        Media hit = new Media(f.toURI().toString());
        MediaPlayer mediaPlayer = new MediaPlayer(hit);
        mediaPlayer.play();
    } catch(Exception ex) {
        ex.printStackTrace();
        System.out.println("Exception: " + ex.getMessage());
    }

```

If you are not on `Java 7`, you can grab `JavaFX` jars from **[here](http://www.oracle.com/technetwork/java/javafx/downloads/index.html)**.
You should convert wav audio files to 8khz, 16 bit, mono PCM in uncompressed format. Then it will work.