Search code examples
javaaudiomp3

No sound heard after playing an mp3 file


Hye there. I just want to play an mp3 file in my Java J2SE Desktop app. all is going fine with no exceptions but the problem is the audio sound is not heard I have checked my speakers as well use all kind a Java mp3 plugins like JMF and JLayer by JavaZoom. My code is listed below and i have added Jlayer.jar to my project also. Please help me give me solution of the problem because I'm trying since last 3 days but failed to do so! Please help me thanks in advance...

  private void playMe(){

    try{

        String file="E://Net Beans Work Space//mp3//a.mp3";

        FileInputStream fis     = new FileInputStream(file);

        BufferedInputStream bis = new BufferedInputStream(fis);

        player = new Player(bis);

     }catch(Exception e){

        System.out.print("ERROR "+e);

    }

 }

Solution

  • Did you try to start the player?

    player.start();