jmf error on eclipse [message #172043] |
Thu, 05 August 2004 13:33 |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: thushara.wickram.cingular.com
Hi,
I'm trying to run sample JMF program with eclipse2.1.2
(if this is not the right forum please direct..)
installed jmf v211e and can run JMStudio from start, programs
I did project properties,..add lib...external jar and jmf.jar
I can compile but at run time is says
com.sun.media.protocol.file.DataSource : java.io.IOException: File Not
Found
Any idea of what I should do ?
Is this jmf problem or eclipse problem ?
thanks
T
+++++++++++++++++++++++++++++++++++++++++++++++++++++
this is the sample program I try to run :
//file: MediaPlayer.java
import java.awt.*;
import java.net.URL;
import javax.swing.*;
import javax.media.*;
public class MediaPlayer {
public static void main( String[] args ) throws Exception {
final JFrame frame = new JFrame("MediaPlayer");
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
URL url = new URL( "file://localhost//C://Program
Files//eclipse//workspace//test.au" );
final Player player = Manager.createPlayer( url );
player.addControllerListener( new ControllerListener( ) {
public void controllerUpdate( ControllerEvent ce ) {
if ( ce instanceof RealizeCompleteEvent )
{
Component visual = player.getVisualComponent( );
Component control = player.getControlPanelComponent( );
if ( visual != null )
frame.getContentPane( ).add( visual, "Center" );
frame.getContentPane( ).add( control, "South" );
frame.pack( );
frame.setVisible( true );
player.start( );
}
}
});
player.realize( );
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++
detailed error :
java.io.IOException: File Not Found
java.io.IOException: File Not Found
javax.media.NoPlayerException: Error instantiating class:
com.sun.media.protocol.file.DataSource : java.io.IOException: File Not
Found
at javax.media.Manager.createPlayerForContent(Manager.java:1362 )
at javax.media.Manager.createPlayer(Manager.java:417)
at javax.media.Manager.createPlayer(Manager.java:332)
at MediaPlayer.main(MediaPlayer.java:13)
|
|
|
Powered by
FUDForum. Page generated in 0.03363 seconds