Solved

Error while trying to run the applet in the browser.

Posted on 2006-10-28
8
559 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
Independent Software Vendors: 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

689 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