Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6358787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:26:01+00:00 2026-05-24T23:26:01+00:00

The player doesn’t play videos stored in project (File in res and src )

  • 0

The player doesn’t play videos stored in project (File in res and src )

public class videoplayer extends MIDlet {
       Display display;
       Player player;

       public videoplayer() {
          try{
                display = Display.getDisplay(this);
                InputStream is =getClass().getResourceAsStream("/a1.mpg");
                player = Manager.createPlayer(is,"video/mpeg");

          }catch(Exception e)
          {
            e.printStackTrace();
          }
       }

       protected void startApp() {        
           try {
                 VideoControl vc;
                 player.realize();
                 vc = (VideoControl)player.getControl("VideoControl");
                 if(vc != null) {
                    Item video = (Item)vc.initDisplayMode(vc.USE_GUI_PRIMITIVE, null);
                    Form v = new Form("Playing Video...");
                    v.append(video);
                    display.setCurrent(v);
                 }
                 player.prefetch();
                 player.start();
              }
          catch(Exception e)
          {
              e.printStackTrace();
          }

       }

but it shows following exceptions in run time. i tried this code by storing file in res and with src but same exceptions.

java.lang.IllegalArgumentException
 - javax.microedition.media.Manager.createPlayer(), bci=8
 - videoplayer.videoplayer.<init>(), bci=25
 - java.lang.Class.newInstance(), bci=0
 - com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=46
 - com.sun.midp.midlet.MIDletStateHandler.createMIDlet(), bci=66
 - com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(), bci=17
 - com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=27
 - com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=52
 - com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=8
 - com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=161
 - com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
java.lang.NullPointerException:   0
 - videoplayer.videoplayer.startApp(), bci=4
 - javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
 - com.sun.midp.midlet.MIDletPeer.startApp(), bci=7
 - com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=269
 - com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=52
 - com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=8
 - com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=161
 - com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26

EDIT: directory structure

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:26:01+00:00Added an answer on May 24, 2026 at 11:26 pm

    put the file into res and put res under src

    so it should be

    src \ res

    and in code

    InputStream is =getClass().getResourceAsStream("res/a1.mpg")
    

    Update on your second issue

    go to

    /runtimes/cldc-hi/bin/jwc_properties.ini

    find the property system.jam_space raise its value

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A player: http://www.yvoschaap.com/videowall/ How can you customise the above Chromeless Youtube to have Play/Stop/Pause
could you explain me why my flash video player doesn't work in Chrome while
Tried Flowplayer, doesn't seem great, is JW Player better ? Any other suggestion ?
I'm trying to implement a MPMedia player to play internet files. So far I
My Samsung Galaxy Gio s5660 doesn't seem to want to run my AS3 project
Are there solutions to get de flash player ( doesn't matter what version (
Unfortunately, Flash Player doesn't support using request headers with GET requests, as noted here
in older versions of flash player if I opened a swf file in a
Anyone know why when I click the #stopbar the #player doesn't disapear? I can
I created custom audio player class which use AudioUnit and ExtAudioFile . In my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.