Solved

Error while trying to run the applet in the browser.

Posted on 2006-10-28
8
558 Views
Last Modified: 2008-01-09
Windows IE Brwoser, XP, Logitech camera
 
I have created an applet that uses JMF to trap video from a camera for display and capture.
When using the Applet Viewer within the JBuilder IDE, the applet works fine, I see the video and
can capture images as desired; When I run it in the browser, I get an error while trying to initialize capture device
'vfw:Microsoft WDM Image Capture (Win32):0'  (this is the device detected by JMF)
it comes in the JMF function 'CaptureDeviceManager.getDevice( dev )', where dev is
the device noted above.
 
Last time I had this problem, I was able to solve it by signing the applet jar file.
That does not work in this case.  I have created a certificate and keystore .
I have used 'jarsigner' to sign the applet jar file.
I have verified that the jarfile is signed using the -verify option.
I get the popup asking for permission to use the file when I bring up the applet in the browser.
 
I have tried a couple different methods to sign the jar file and have even tried importing a
certificate to the browser.
 
I think I have the signing part done, but I still can't initialize the capture device.
The applet jar file appears to have the  necessary 'javax.media' and JMF classes included.
 
Has anyone else had this problem?
 
Any suggestions?



0
Comment
Question by:awilner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
8 Comments
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 17844593
what are the exceptions that you are getting?
0
 
LVL 5

Expert Comment

by:deeppra
ID: 17954537
i am not sure may be because of some security reason or bexause of u r browser
0
 

Author Comment

by:awilner
ID: 17956412
Thanks deeppra,

The Applet is working perfectly in the applet viewer, but not when I am trying to embed it in the browser. I tried different both IE and Mozilla browsers and tried signing the applet with different options.

ImageCapture = imagecam.ImageCapture[panel0,0,0,0x0,invalid,layout=java.awt.FlowLayout]
 Trying to start camera attempt = 0
Initializing device = vfw:Microsoft WDM Image Capture (Win32):0
Error initializinig video player
java.lang.NullPointerException
Iteration 1
 Trying to start camera attempt = 1
Initializing device = vfw:Microsoft WDM Image Capture (Win32):0
Error initializinig video player
java.lang.NullPointerException
Iteration 2

<snip...>

Iteration 49
 Trying to start camera attempt = 49
Initializing device = vfw:Microsoft WDM Image Capture (Win32):0
Error initializinig video player
java.lang.NullPointerException
Iteration 50
Panel components created
Error initializing camera - terminating
java.lang.NullPointerException
      at imagecam.ImageCapture.<init>(ImageCapture.java:131)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at java.lang.Class.newInstance0(Unknown Source)
      at java.lang.Class.newInstance(Unknown Source)
      at sun.applet.AppletPanel.createApplet(Unknown Source)
      at sun.plugin.AppletViewer.createApplet(Unknown Source)
      at sun.applet.AppletPanel.runLoader(Unknown Source)
      at sun.applet.AppletPanel.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:deeppra
ID: 17962465
send me the code where u r creating the player object
0
 
LVL 5

Accepted Solution

by:
deeppra earned 500 total points
ID: 17962485
some similar issues are

http://forum.java.sun.com/thread.jspa?threadID=620511&messageID=3500790
http://java.sun.com/products/java-media/jmf/2.1.1/jmfdiagnostics.html

These are the things present in JMF FAQ
http://java.sun.com/products/java-media/jmf/reference/faqs/index.html

Q: Can I run JMF 2.1.1 in a browser?

Yes. JMF 2.1.1 runs on Java Compatible platforms running JDK 1.1.6 and above.

You can use JMF with:

    * HotJava Browser 1.1
    * Netscape Communicator 4.03-4.05 with the JDK 1.1 patch
    * Netscape Communicator 4.06 or later
    * Microsoft Internet Explorer 4.01 or later


Q: Why don't JMF applets work in my browser?

Possible reasons are:

    * JMF is not properly installed on your machine or is not available on the website that contains the applet in question. Run the JMF diagnostics applet to see if JMF is installed properly: http://java.sun.com/products/java-media/jmf/2.1.1/jmfdiagnostics.html
    * Your browser does not have a JDK 1.1.x compatible Java VM. Upgrade to a more recent version of the browser.
    * The applet might have thrown a security exception - check the Java Console pertaining to your browser.
0
 

Author Comment

by:awilner
ID: 18197256
It seems that it's enough to post couple of inrelated links and then just wait - instead of understanding the problem.
I appreciate what EE is trying to do - it used to be an excellent source, but recently I am just not getting much help.  
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with LDAp login using jsp 6 120
difference between member and local variables. 29 148
using if condition without JSTL 2 119
junit example issue 2 54
Check out this step-by-step guide for asking an anonymous question on Experts Exchange.
By reading this blog, MSPs will gain insight into how to improve communications with their clients as well as establish a more profitable business.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question