CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: java audio

  1. #1
    Join Date
    Feb 2013
    Posts
    22

    java audio

    Hey I'm making a simple program to playback audio such as mp3. My coding works but when I run the program and choose a mp3 file I get the error message
    "Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian,
    Signed, 24000.0 frame rate, FrameSize=32768 bits
    Failed to realize: com.sun.media.PlaybackEngine@193b604
    Error: Unable to realize com.sun.media.PlaybackEngine@193b604
    Press any key to continue . . ."

    I have installed the Java media framework. and think I installed the mp3 plugin properly. Under my system properties in environmental variables , under system variables I have as follows ,
    CLASSPATH = ; .; %JMFHOME%\lib\jmf.jar; .;%CLASSPATH% ; %JMFHOME%\lib\mp3plugin.jar;.;%CLASSPATH%
    JAVA_HOME = C:\Program Files\Java\jdk1.7.0_25
    JMFHOME = C:\JMF-2.1.1e

    I have also put the mp3plugin.jar under the lib/ext folder as well and when I try to cmd and run the command: java com.sun.media.codec.audio.mp3.JavaDecoder ,
    I get error messages of:
    C:\Users\jumpman8947>java com.sun.media.codec.audio.mp3.JavaDecoder
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/media/codec/a
    udio/AudioCodec
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: com.sun.media.codec.audio.AudioCode
    c
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 14 more

    I can't figure out what i'm doing wrong please help, Thanks.

  2. #2
    Join Date
    Feb 2013
    Posts
    22

    Re: java audio

    I guess this will stay an unsolved mystery.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured