title: convert string to audio input in java
body: <p>I want to play a sound in java.</p>
  
  <p>I have my string with location of sound static <code>String s1 = "../files/song.wav";</code><br>
  I have my file which gets passed path to string <code>File yourFile = new File(s1);</code></p>
  
  <p>And I have my method:</p>
  
  <pre><code>public void playCorrectSound(String song) throws IOException, LineUnavailableException  {
      try {
          AudioInputStream audio = AudioSystem.getAudioInputStream(Clip.class.getResourceAsStream(correctSong));
          Clip clip = AudioSystem.getClip();
          clip.open(audio);
          clip.start();
      } catch (Exception e) {
      }
  }
  </code></pre>
  
  <p>This line gives error <code>AudioInputStream audio = AudioSystem.getAudioInputStream(song);</code> as it needs (song) to be converted to a compatible type but how do i do it? </p>
  
  <p>Exception is "no suitable method found for getAudioInputStream(String)"</p>