?
Solved

Error while trying to run the applet in the browser.

Posted on 2006-10-28
8
Medium Priority
?
561 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
Technology Partners: 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

777 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