Applet wav to mp3 conversion - tritonus plugins, lame dlls
Amos Matt
Greenhorn
Joined: Mar 30, 2007
Posts: 15
posted
0
Hi All,
I am trying to convert .wav file to .mp3 using Mp3Encoder.java given by tritonus.
I have kept tritonus_share.jar, tritonus_mp3.jar,tritonus_remaining-0.3.6.jar files under Jboss...\default\lib & under "ext" folder of Jdk. And lametritonus.dll, lame_enc.dll under Windows\system32. when i run Mp3Encoder.java on the command prompt, the input wave file is converted to .mp3.
Now i am trying to use the same conversion code in an Applet to convert the recorded .wav audioinputstream to .mp3.
below is the code...
Here when i record the voice and try to call the above code in a method my program throwing exception as "Exception while converting : org.tritonus.share.sampled.AudioFileTypes".
I also found the exception generating by "AudioFileTypes.getType("MP3", "mp3") " call to the tritonus plugin.
Could you please tell me how to solve this problem.
Thank you,
Kanakam
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
I suspect it's a permission thing because the code tries to do something that applets aren't allowed to do. Seeing the full chain of exceptions would help.
java.lang.NoClassDefFoundError: org/tritonus/share/sampled/AudioFileTypes
at com.kas.rdd.sound.CapPback.convertTheStream(CapPback.java:768)
at com.kas.rdd.sound.CapPback.actionPerformed(CapPback.java:483)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
throwable rg/tritonus/share/sampled/AudioFileTypes
Thanks.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
It seems that the applet JRE doesn't have access to those files you put in the "ext" directory. Maybe you have more than one JRE installed, and the applet plugin uses a different one?
Amos Matt
Greenhorn
Joined: Mar 30, 2007
Posts: 15
posted
0
Thanks Ulf,
Just before your reply i found the problem. And what you said is the correct.
I tried putting the jar files in other JRE also. Now my applet is recognizing.