JMF MP3.....PLZZZZ HELPPPPP

Discussion in 'Software' started by adiraju_anuradha, Mar 17, 2012.

  1. adiraju_anuradha

    adiraju_anuradha

    Joined:
    Mar 14, 2012
    Messages:
    5
    Likes Received:
    0
    adiraju_anuradha, Mar 17, 2012
    #1
    1. Advertisements

  2. adiraju_anuradha

    adiraju_anuradha

    Joined:
    Mar 14, 2012
    Messages:
    5
    Likes Received:
    0
    http://www.oracle.com/technetwork/java/javase/download-137625.html


    when u click the above link u get the following message


    Downloads
    JMF MP3 Plugin



    Java MP3 PlugIn Manual Installation
    Unzip the JavaMP3plugin.zip in the JRE directory of your choice.
    The included jar file (mp3plugin.jar) contains a Java Sound plugin as well as a Java Media Framework plugin for playing MPEG-2 Layer 3 Audio.
    The jar file will be installed in the /lib/ext directory, where stands for the location on your system where the Java Runtime Environment is installed. For instance, on windows, this could be something like C:\Program Files\Java\j2re1.4.2_01.
    That will make the plugin available for Java Sound applications and applets run using that specific JRE. If you have multiple JREs installed on your system, you must copy the mp3plugin.jar to each of those JRE installations.
    For the plugin to work within a JMF application, you need too :
    - ensure that jmf.jar is also in the /lib/ext directory
    - run the following command:

    java com.sun.media.codec.audio.mp3.JavaDecoder
    You should see a message that it was successfully registered, without any error message.



    ..but my goal is to get the mp3plugin.jar in the JavaMP3plugin.zip file......i am not able to find it......so where can i find it...??????plz tel me...
     
    Last edited: Mar 18, 2012
    adiraju_anuradha, Mar 18, 2012
    #2
    1. Advertisements

  3. adiraju_anuradha

    jcbrother

    Joined:
    Mar 24, 2012
    Messages:
    4
    Likes Received:
    0
    Play an MP3 Using Java Media Framework




    import javax.media.*;
    import java.io.*;
    import java.net.URL;
    class mp3 extends Thread
    {
    private URL url;
    private MediaLocator mediaLocator;
    private Player playMP3;
    public mp3(String mp3)
    {
    try{
    this.url = new URL(mp3);
    }catch(java.net.MalformedURLException e)
    {System.out.println(e.getMessage());}
    }
    public void run()
    {
    try{
    mediaLocator = new MediaLocator(url);
    playMP3 = Manager.createPlayer(mediaLocator);
    }catch(java.io.IOException e)
    {System.out.println(e.getMessage());
    }catch(javax.media.NoPlayerException e)
    {System.out.println(e.getMessage());}
    playMP3.addControllerListener(new ControllerListener()
    {
    public void controllerUpdate(ControllerEvent e)
    {
    if (e instanceof EndOfMediaEvent)
    {
    playMP3.stop();
    playMP3.close();
    }
    }
    }
    );
    playMP3.realize();
    playMP3.start();
    }
    }
    public class playmp3{
    public static void main(String[] args)
    {
    mp3 t = new mp3("file:///C://JavaApplications//cd.mp3");
    t.start();
    }
    }
    by white sox jersey
     
    jcbrother, Mar 24, 2012
    #3
  4. adiraju_anuradha

    adiraju_anuradha

    Joined:
    Mar 14, 2012
    Messages:
    5
    Likes Received:
    0
    error

    its not working....its giving an exception saying..some playback engine exception
     
    adiraju_anuradha, Mar 25, 2012
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.