title: Java - Unsupported Audio File Exception
body: <p>I'm trying to add sound to my java game...</p>
  
  <p>I'm playing Sultans of swing at runtime:</p>
  
  <pre><code>static String WHOOSH = "res/WHOOSH.WAV";
  static String SULTANS = "res/DireStraits_SultansOfSwing.wav";
  </code></pre>
  
  <p><code>music(SULTANS, true);</code></p>
  
  <p>And this whoosh sound when the ball hits a paddle</p>
  
  <p><code>music(WHOOSH, false);</code></p>
  
  <pre><code>public void music(String path, Boolean loop) {
      try {
          //will go into file folder and get music file (getResource)
          AudioInputStream audio = AudioSystem.getAudioInputStream(GamePanel.class.getResource(path));
          Clip clip = AudioSystem.getClip();
          clip.open(audio);
          clip.start();
          if (loop) {
              clip.loop(1000);
          }   
      }
      catch (Exception e) {
          System.out.println("Check: " + path + "\n");
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p><strong>Problem:</strong> </p>
  
  <p>The "Whoosh" always works, but Sultans of Swing does not. Sultans gives me this "Unsupported Audio File Exception" error, which oracle docs tells me </p>
  
  <p><code>An UnsupportedAudioFileException is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.</code></p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>Check: res/DireStraits_SultansOfSwing.wav
  
  javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input URL at javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source)
  </code></pre>
  
  <p>But you can see from these photos that they're both .wav files...</p>
  
  <p><img src="https://i.stack.imgur.com/xyfQ7.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/89Yv8.png" alt="enter image description here"></p>
  
  <p>Why is it throwing that error? Is it a size issue?</p>
  
  <p>Thanks!</p>