title: Java - Sound Effects Doesn't Play
body: <p>I have a program which plays audio but when I need to play a different audio file it does play (and there is no mistake in the location/spelling ). </p>
  
  <pre><code>    if ((getCoordinatesOfDuplicates() == null) &amp;&amp; (getEmptyCellsCount() == 0)) {
  
          try {
              java.applet.AudioClip clip =
                      java.applet.Applet.newAudioClip(
                      new java.net.URL("file:src//audio/applause2.wav"));
  
              clip.play();
          } catch (java.net.MalformedURLException murle) {
              System.out.println(murle);
          }
          System.out.println("Well Done");
  
      } else  {
          try {
              java.applet.AudioClip clip =
                      java.applet.Applet.newAudioClip(
                      new java.net.URL("file:src//audio/shutoff.wav"));
  
              clip.play();
          } catch (java.net.MalformedURLException murle) {
              System.out.println(murle);
          }
          System.out.println("You did something wrong in the puzzle");
  
      }
  </code></pre>
  
  <p>The Applause plays fine but the shutoff doesn't play even though the code is the exactly the same and the "You did something wrong in the puzzle" shows up. </p>
  
  <p>Any Ideas?</p>