NPE when creating a player. Please help

Hi,
I have an avi file at C:\WorkArea\Temp\Test.avi. I am trying to create a Player object out of it, but I am getting a NPE when doing so. Can anyone tell me why?
public static void main(String[] args) throws NoPlayerException, IOException {
          Player player =
               Manager.createPlayer(
                         ClassLoader.getSystemResource("C:\\WorkArea\\Temp\\Test.avi"));
         System.out.println(player != null);
     }When I run this code, I get the following error,
Exception in thread "main" java.lang.NullPointerException
     at javax.media.MediaLocator.<init>(MediaLocator.java:37)
     at javax.media.Manager.createPlayer(Manager.java:332)

Hi,
you will probably have to change your URL. I think you have to use the file-protocol, so it would look like that:
file://C:/workArea/Temp/Test.avi
If it doesn't work have a look in the jmf doku, there are some similar examples.

Similar Messages

  • The volume up and down controls on my wireless keyboard show a no entry sign and do not respond when used...please help?

    The volume up and down controls on my wireless keyboard show a no entry sign and do not respond when used...please help?

    If you want to get a little more "exotic" you can try remapping the function keys.  I did a little google searching and the hits that looked promising are,
    Mapping volume and eject keys to 3rd-party keyboard Other Hardware
    Spark
    Spark is a powerful, and easy Shortcuts manager. With Spark you can create Hot Keys to launch applications and documents, execute AppleScript, control iTunes, and more...
    You can also export and import your Hot Keys library, or save it in HTML format to print it.
    Spark is free, so use it without moderation!

  • I need to create Buttons dynamically Please Help

    I am currently developing a card game. I represent my cards as buttons. But as the player draws more cards from the deck I have to generate buttons dynamically at run-time. I could use arrays of buttons and store new buttons inside that arrays of buttons. But the only problem is I need ActionListener for each of my buttons. How do you create ActionListener for each different dynamically created buttons? Please Help.

    Here is my code. I just do not understand how to create those functions dynamically that functions different each time.
    Here is my code please take a look.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class run108{
    JButton setbutton;
    JButton ButtonUp;
    JButton ButtonDeal;     
    JButton slot1;
    JButton slot2;
    JButton slot3;
    JButton slot4;
    JButton slot5;
    JButton slot6;
    JButton slot7;
    cards[] card = new cards[55];
    public static void main(String[] argv)
         run108 startgui = new run108();
         startgui.createframe();     
    void createframe()
         //Standard of way of creating Frame
         JFrame frame = new JFrame("108");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.setLocation(300,200);// Tells the startup position;
         //Adding Panels to the framework
         JPanel panelA = new JPanel();
         panelA.setBackground(Color.white);
         panelA.setLayout(new BoxLayout(panelA,BoxLayout.Y_AXIS));
         JPanel panelB = new JPanel();
         JPanel panelC = new JPanel();
         //Adding buttons with card images
         JLabel label1 = new JLabel("       Set of Cards");
         panelA.add(label1);
         ImageIcon pic1 = new ImageIcon("cards/backd.png");
         setbutton = new JButton(pic1);          
        panelA.add(setbutton);
        ImageIcon picdeal = new ImageIcon("cards/deal.png");
         ButtonDeal = new JButton(picdeal);
         panelA.add(BorderLayout.CENTER, ButtonDeal);
        ButtonDeal.addActionListener(new DealListener());
         JLabel label2 = new JLabel("       Your Target");
         panelA.add(label2);
         ButtonUp = new JButton(pic1);          
        panelA.add(BorderLayout.CENTER, ButtonUp);
        frame.add(BorderLayout.WEST,panelA);
        // Adds 7 initial card slots.
         ImageIcon pic2 = new ImageIcon("cards/backc.png");
         slot1 = new JButton(pic2);
        panelB.add(slot1);          
        slot1.addActionListener(new Slot1Listener());
        slot2 = new JButton(pic2);
        panelB.add(slot2);
        slot2.addActionListener(new Slot2Listener());
         slot3 = new JButton(pic2);
        panelB.add(slot3);
        slot3.addActionListener(new Slot3Listener());
         slot4 = new JButton(pic2);
        panelB.add(slot4);
        slot4.addActionListener(new Slot4Listener());
         slot5 = new JButton(pic2);
        panelB.add(slot5);
        slot5.addActionListener(new Slot5Listener());
         slot6 = new JButton(pic2);
        panelB.add(slot6);
        slot6.addActionListener(new Slot6Listener());
         slot7 = new JButton(pic2);
        panelB.add(slot7);
        slot7.addActionListener(new Slot7Listener());
        frame.add(BorderLayout.CENTER,panelB);
        // This has to be added @ the end to show the components
        //that were added after on. If it is placed before the components
        //the components shall not appear since they sit on the frame
         frame.setSize(600,500);
         frame.setVisible(true);
    class DealListener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot1Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot2Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot3Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot4Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot5Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot6Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot7Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    }

  • I have the 10.7.4 and I cannot get the Flash Player ,, please help me.

    I have the 10.7.4 and I cannot get the Flash Player ,, please help me.

    If you downloaded it, it's likely in your Downloads folder as a Disk Image .dmg. Just open it and intall Flash player and restart your browser. Everything should work.
    Clinton

  • [NAND] s_cxt_boot:88 sftl: error, unclean shutdown; adopted 23 spans thats what appears in my iPhone 4s when I wake up please Help me

    [NAND] s_cxt_boot:88 sftl: error, unclean shutdown; adopted 23 spans thats what appears in my iPhone 4s when I wake up please Help me

    First try resetting your phone - hold the HOME and SLEEP buttons at the same time until an Apple logo appears.
    If that doesn't work restore the phone using Recovery Mode: http://support.apple.com/kb/HT1808.
    And if that fails it is probably a hardware failure (unless the phone is jailbroken; then that is the problem).

  • Hi, my ipad 2 won't charge nor sync but it can be charge when it totally drain. please help..

    hi, my ipad 2 won't charge nor sync but it can be charge when it totally drain. please help..

    Hello Thisbemadi,
    Thanks for using Apple Support Communities.
    Please ensure you are charging your iPad with the Apple cable and power adapter that came with the device.  If the issue persists, reset your iPad to its factory settings and try charging again.
    iPad: Charging the battery
    Use iTunes to restore your iOS device to factory settings
    Take care,
    Alex H.

  • Currently i am outside country and using my family person sim but my iphone display shows unknown call it become difficult when i missed call please help me out

    currently i am outside country and using my family person sim but my iphone incoming call display shows unknown call it become difficult when i missed call please help me out

    We are all users here
    what exactly do want any one to do ?

  • Flash player crashes my computer when used . . . please help!

    the newest versions of flash player required for use in you tube and hulu crash my computer and causes it to reboot. I'm using windows xp home edition 32 bit, have updated my drivers, and have tried to use several different versions of the flash player 10( installing the other versions first), as well as trying to use it in internet explorer 8, firefox 5, and google chrome. The computer does not crash unless the flash player is in use. I have tried everything I can think of, to no avail. This problem did not happen UNTIL I was forced to udate the flash player to the latest version in order to watch Hulu and you tube due to their requirements. PLEASE HELP!

    osprey623 wrote:
    I have tried everything I can think of, to no avail.
    Have you tried to disable Hardware Acceleration?

  • Problem in creating DB Link - Please help

    Hi ,
    I created a DB Link with name "CTM_DBLINK".
    i want to create DB Link with different name but using same server and connection also same.
    When i am trying this its shows error :
    "ORA-00933:SQL Command not properly ended."
    My Query :
    create public database link "CTM_BANK"
    connect to ABC
    identified by <pwd>
    using 'database';
    i am getting error on line 3 : identified by <pwd>
    Please help , its urgent.
    Surender

    Try enclosing the password in quotes.
    Same problem occurs if you try to create a user using the password you have given.
    SQL> create user abc identified by abc!;
    create user abc identified by abc!
    ERROR at line 1:
    ORA-00922: missing or invalid option
    SQL> create user abc identified by "abc!" ;
    User created.
    To create the database link, try this:
    SQL> CREATE PUBLIC DATABASE LINK "CTM_BANK" CONNECT TO "ABC"
    2 IDENTIFIED BY "abc!"
    3 USING 'database' ;
    Database link created.
    Hope that helps!
    Regards.
    RK

  • Lightroom 4.3 freezes system when I try export - please help me!

    I am so tired now with this Lightroom
    Almost every time when I try export all system creshes.
    My computer:
    Intel(R) Core(TM)2 Quad CPU Q9650 3,00 GHz
    8 GB RAM
    ATI Radeon HD 4800
    Windows 7 Service Pack 1
    I wrote to technical support and got advice about instal Lightroom 4.3 (I tried it with 4.1, 4.2, 4.3) on created new user  Windows, and nothing. I exported few photos and now again I can't export no photos more. And get still crashing system
    Please help me...

    And if all that happens is your system freezes without any error message and the only thing you can do is power it off, then I can think of a couple things: 
    1)      If you have your phone plugged in to a USB cable attached to the computer, disconnect it.  Some phones don’t play nice when they are connected as removable storage.  Unplug any other USB devices to see if the Export starts to function, again.
    2)      Your computer may have a hardware or driver issue where installing new video drivers and testing memory are a couple things to try but otherwise it may be hard to diagnose.
    Since it worked once, there is some hope you’ll be able to determine what is causing it not to work by repeated the process preceded the one time it did work, and then don’t change anything and try another Export and see if it works, and if so, then keep track of what you do elsewise with the system between the last time it works and the first time it doesn’t to see if there is some pattern.

  • Cannot download flash player (please help)

    recently i have bought a mac and I have tried to download flash player but it doesn't work at all. I go to their website and download, follow every single step until the end, then it says that it was installed successfully. however when i want to watch a video it says that i don't have flash player, although I've followed all the steps to download it.
    i have os x Yosemite version 10.10.1. Please help.
    thx

    Launch Disk Utility, select your hard drive in the left hand window and click on the Repair Disk Permissions button:

  • Mega Player - PLEASE HELP

    I have a BIG problem.
    I have formated my Mega Player MS-515 256MB and now when I turn it on it shows message "Media error". Is there any way to fix it??? I payed it very, very much. Please help me!!!
    Mina

    I have two solutions for your reference!!!
    1.Pressing enter "FM / A->B key" + "REC key" will power off!! open power and try again...
    2.Firmware update!!! please confirm your mega player is 515 or 515 Lite.
    Firmware update process:
    1.Please download and install the latest firmware and driver!!
    MS-515(USB1.1):
    (http://www.msi.com.tw/program/products/ia/ia/pro_ia_detail.php?UID=564)
    MS-515 Lite(USB2.0):
    (http://www.msi.com.tw/program/products/ia/ia/pro_ia_detail.php?UID=613)
    2. After firmware unzipped will show some files, please cover driver installation files (C:\Program Files\MSI\MS-5515)
    3. Please press “play key” continuously first (While mega player can't be recognized by PC please add this procedure) and plug your mega player 515 in your PC.
    4. Please enter OS "start" (below left corner) and enter "program collecting" and choose to "MSI MS-5515" update now!!!
    5. After update success you can release of your finger. (While mega player can't be recognized by PC please add this procedure)
    Please try again!!!
    Hope to solve your issue!!

  • HT1338 cant download latest version of flash player please help

    Can some one help me. I can't seem to view all my pics or videos. Because i do not have the latest version of
    flash player. Now everytime i try to download it . It disappears,so basically it never downloaded. Can someone
    please help me..

    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    See in each Browser which version of Flash it thinks it has...
    http://kb2.adobe.com/cps/155/tn_15507.html
    In Safari Preferences>General, where is it set to save downloads to?

  • Error while Creating sequence. Please help

    I'm using below script to create sequence but getting error
    Error report:
    SQL Error: ORA-01722: invalid number
    01722. 00000 - "invalid number"
    CREATE SEQUENCE BL_BTN_MASTER_SEQ
    MINVALUE 1
    MAXVALUE 999999999999999999
    INCREMENT BY 1
    START WITH (SELECT MAX(BULLETIN_MASTER_ID)+1
    FROM BL_BTN_MASTER)
    NOCACHE;
    FYI..Data type of bulletin_master_id column is NUMBER(22,0)
    PLease help.
    Edited by: user11228834 on May 29, 2013 10:22 AM
    Edited by: user11228834 on May 29, 2013 10:23 AM
    Edited by: user11228834 on May 29, 2013 10:25 AM

    Oracle doesn't like the "(select max(bulletin_master_id)+1 from bl_btn_master)' statement embedded in the CREATE SEQUENCE statement because if you look at the syntax it is expecting an acual number. You could use execute immediate to create the sequence this way:
    {code}
    declare
    v_seq number;
    v_statement varchar2(200);
    begin
    select max(bulletin_master_id)+1
    into v_seq
    from bl_btn_master;
    v_statement := 'CREATE SEQUENCE BL_BTN_MASTER_SEQ ' ||
    'MINVALUE 1 ' ||
    'MAXVALUE 999999999999999999 ' ||
    'INCREMENT BY 1 ' ||
    'START WITH ' || v_seq ||
    'NOCACHE';
    execute immediate(v_statement);
    end;
    {code}

  • Big problem installing Adobe Flash Player, please help?

    Please help. I tried to download Adobe Flash Player 5 times without success. Every time it states Installation succeeded, but I can't find it anywhere.
    I have to keep closing and opening Browsers without any reaction of the so called installed Flash Player. What a mess!

    Flash is installed as a browser plugin. You won't see it as an app in OS X. If you go here it will tell you if flash is installed and working. http://www.adobe.com/software/flash/about/

Maybe you are looking for

  • Posting a previously parked incoming invoice

    Hi all, Can anybody help me with the following scenario: I am parking incoming invoice document using BAPI_INCOMINGINVOICE_PARK. It gives me a document no. Later I want to post this document. I don't know which BAPI or fm to use for this. Is it possi

  • Epson icc or system managed?

    i keep reading that the best settings to print from aperture are to choose a profile from print dialog and to turn color controls off from printer's control panel.. but if i follow this advice i keep getting dark prints, even with gamma 1.30, while u

  • Personal Edition for Windows 95

    I have an old PC that I want to load a copy of Oracle on for training. The PC has windows 95 on it and I can't upgrade the OS because the PC is 7 years old. Where can I get a copy of Personal Oracle that runs on Windows 95. Looks like you can only do

  • Is there no more activity on weblogic.developer.interest.general?

    I cannot seem to see any activity on the weblogic.developer.interest.general (as well as some other interest newsgroups). Is there an alternative? Thanks. PS Sorry for posting this here, but there's activity here, and my posting on the other newsgrou

  • NPS + Domain Controller

    Hello Can i install NPS with RADIUS on a Domain Controller? tks for answering Marc