title: Live audio streaming through a Java application
body: <p>I am trying to play audio streaming using a simple java application. I have written the code but getting the following exception:</p>
  
  <p>"javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input URL"</p>
  
  <p>Not sure what I am doing wrong. Please help.
  Thank you.</p>
  
  <p>Pasted below is my code:</p>
  
  <pre><code>    public static void main(String[] args) {
          URL url = null;
  
          try {
              url = new URL("http://stream.xmission.com:8000/kcpw");
              AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(url);
              Clip clip = AudioSystem.getClip();
              clip.open(audioInputStream);
              clip.start();
          } catch (IOException e) {
              e.printStackTrace();
          } catch (UnsupportedAudioFileException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (LineUnavailableException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
      }
  </code></pre>