title: Can't get audio file to play
body: <p>I can't seem to figure out why my audio file won't play. The audio file is a wav file and is just. The error i am getting is  <code>javax.sound.sampled.UnsupportedAudioFileException</code>.  </p>
  
  <pre><code>public class MusicProgress {
  public static void main(String[] args) {
      // TODO Auto-generated method stub
      JFrame b = new JFrame();
      FileDialog fd = new FileDialog(b, "Pick a file: ", FileDialog.LOAD);
      fd.setVisible(true);
      final File file = new File(fd.getDirectory() + fd.getFile());
      //URI directory = new URI (fd.getDirectory() + fd.getFile());
      try {
          AudioInputStream inputStream = AudioSystem.getAudioInputStream(file);
          AudioFormat audioFormat = inputStream.getFormat();
          Clip clip = AudioSystem.getClip();
          clip.open(inputStream);
          clip.start();
      } catch (LineUnavailableException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (UnsupportedAudioFileException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
  
  
  }
  
  }
  </code></pre>