0

I have written a program which I used Java Media Framework (JMF) Library to capture video from camera and display the video, when I run the program in Eclipse it work will, but when I export the program as runnable jar file, then the program cannot detect the device. I have done some experiment which I will share with you below.

I installed JFM in C drive and I add the libraries from C drive to Eclipse (C:\Program Files\JMF2.1.1e\lib) in this case the program run from Eclipse working will, but when I copied the libraries from (C:\Program Files\JMF2.1.1e\lib) to inside the project in Eclipse, then the same problem happen which cannot detect the device. Now I don’t know how to solve this problem, if anyone knows about this can suggest me. Thanks in Advance!

I have tried all below three options to export, but the same problem happened:

enter image description here

But when I select the first option then Eclipse warn as below: enter image description here

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Bahramdun Adil
  • 5,907
  • 7
  • 35
  • 68
  • **Do not use** the first option. I don't understand the 2nd. I would recommend the 3rd. – Andrew Thompson May 09 '13 at 14:13
  • How do you run the exported JAR? from a command line, or just doubleclicking it? – david a. May 09 '13 at 14:28
  • @AndrewThompson: Can you explain why the first option is bad? – David K May 09 '13 at 14:35
  • And to the OP, it's hard to tell, but it sounds like it could just be a path issue. – David K May 09 '13 at 14:37
  • 1
    @DavidK 'stuffing everything in one Jar' has a number of possible problems, including. 1) SPI information might be lost. 2) Duplication of APIs that should otherwise be installed separately. 3) Legal reasons. 4) Loss of (possibly valid) digital signatures 5) Compaction of natives into the Jar, in such a way as cannot be deployed for an applet or JWS app. .. – Andrew Thompson May 09 '13 at 14:38
  • I run the Jar via double click, the other jar files which is exported all runnable via double click – Bahramdun Adil May 09 '13 at 14:46
  • Add @davida. (or whoever) to notify someone of a new comment. – Andrew Thompson May 10 '13 at 02:41
  • @BahramdunAdil OK, assuming this is a classpath problem, can you check if your JAR file has META-INF/MANIFEST.MF in it and if that file contains a classpath, and if that is a valid one (the dependecy JARS are placed where the manifest file says)? If you select the 3rd option during JAR export, Eclipse should create the manifest for you. Check that please. – david a. May 10 '13 at 11:38

0 Answers0