title: How to loop an MP3 file in javafx?
body: <p>I am trying to figure out how to loop an MP3 using eclipse, what am I doing wrong?</p>
  
  <pre><code>mediaPlayer2.play();{
      mediaPlayer2.setOnEndOfMedia(new Runnable() {
          public void run() {
              mediaPlayer2.seek(Duration.ZERO);
          }
      });
      mediaPlayer2.play();  
  }
  </code></pre>
  
  <p>This should be the code, correct?</p>