Solved

Error while trying to run the applet in the browser.

Posted on 2006-10-28
8
551 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
Comment Utility
what are the exceptions that you are getting?
0
 
LVL 5

Expert Comment

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

Author Comment

by:awilner
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 5

Expert Comment

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

Accepted Solution

by:
deeppra earned 500 total points
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

6 Experts available now in Live!

Get 1:1 Help Now