Solved

Error while trying to run the applet in the browser.

Posted on 2006-10-28
8
554 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
  • 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
xjc and jaxb 2 91
caughtSpeeding java challenge 16 136
difference between projection and projection list in hibernate 1 108
web application structure 18 76
Employees depend heavily on their PCs, and new threats like ransomware make it even more critical to protect their important data.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now