未找到设备

发布于 2024-08-17 06:11:11 字数 192 浏览 16 评论 0原文

我下载并安装了一个 fat-jar eclipse 插件,以便能够打包包含外部库(JMF)的项目。但是当我运行该应用程序时,它显示“未找到设备”。这是否意味着 jmf.jar 未包含在新的 jar 文件中,因为它无法检测到网络摄像头?因为当我在 Eclipse 中运行该应用程序时,没有错误,并且它可以毫无问题地检测到网络摄像头。

我该如何解决这个问题?

I downloaded and installed a fat-jar eclipse plug-in to be able to package my project containing an external library(JMF). But when I run the application, it says "No device found". Does this mean that jmf.jar wasn't included in the new jar file since it can't detect the webcam? Because when I'm running the application in eclipse, there is no error and it can detect the webcam without any trouble.

How can i solve this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

辞旧 2024-08-24 06:11:11

不,“未找到设备”是典型的 JMF 响应 - 它似乎找不到视频/音频输入或输出设备。所以我认为 JMF 确实在你的 jar 里,只是在抱怨。

您的课程是否有可能缺少某些内容?某些东西位于 Eclipse 的类路径中但未包含在您的大 jar 中?

更新

我刚刚记得问题可能出在哪里:出于性能原因等,JMF 使用本机代码;安装 JMF 会安装 DLL(Windows)或 .so(Linux/Mac?)。我猜想,当您对 JMF 的类路径进行如此深远的更改时,JMF 会在查找这些组件时遇到一些困难。

我相信还有一个可用的软件模拟驱动程序。你能尝试使用它并看看它在罐子里是否可以正常工作吗?

No, "No device found" is a typical JMF response - it can't seem to find a video/audio input or output device. So I think JMF is indeed in your jar and is simply complaining.

Is it possible something is missing from your packed-up classes? Something that is on the classpath in Eclipse but not included in your big jar?

Update

I just remembered where the problem may be: For performance reasons etc, JMF uses native code; installing JMF installs DLL's (Windows) or .so's (Linux/Mac?). I'd guess that JMF is having some trouble finding these components when you make such far-reaching changes to its classpath.

I believe there's also a software emulation driver available. Can you try working with that and seeing if it works OK from the jar?

初心 2024-08-24 06:11:11

我刚才遇到了同样的问题,不知道您是否已经这样做了,但我通过将 jmf.properties 文件添加到 .jar 文件所在的同一目录中解决了这个问题。您可以在JMF安装目录的lib目录中找到jmf.properties。只需复制并粘贴即可。

I had this same problem just now, don't know if you have done this but I solved it by adding the jmf.properties file to the same directory as where your .jar file is located. You can find jmf.properties in the lib directory of the JMF installation directory. Just copy and paste it.

〗斷ホ乔殘χμё〖 2024-08-24 06:11:11

fatjar 可能使用静态代码分析来确定生成的 JAR 中包含哪些类文件,并且 JMF 正在使用动态技术基于某种注册表从其他 jar 加载类。找出问题的一种方法是使用 -verbose:class 开关运行应用程序,然后筛选输出以查看哪些类或哪些类无法加载。

It may be that fatjar uses static code analysis to figure out what class files wind up in the generated JAR, and that the JMF is doing dynamic techniques to load classes from other jars based on a registry of some sort. One way to find out is to run your application with the -verbose:class switch, and then sift through the output to see which class or classes failed to load.

踏月而来 2024-08-24 06:11:11

我在Sun 论坛中找到了一个帖子,其中其他人遇到了 JMF 问题。一位回复者建议:

尝试 FMJ (http://www.fmj-sf.net/) 或 gstreamer -java (http://code.google.com/p/gstreamer-java/).


切换媒体框架产品有可能(当然很难保证)是一个解决方案。

I found a post in the Sun forums where someone else was having trouble with JMF. One responder suggested:

try FMJ (http://www.fmj-sf.net/) or gstreamer-java (http://code.google.com/p/gstreamer-java/).

It's possible (though of course hardly guaranteed) that switching media framework products could be a solution.

ペ泪落弦音 2024-08-24 06:11:11

请确保您的 jar 路径,jar 路径不应该是其他路径,如 D: 或 E: ,它应该是 jmf 安装目录,如 C:\Program Files (x86)\JMF2.1.1e\lib\jmf.jar。希望这会对您有所帮助。

Please make sure your jar path, jar path should not be some other path like D: or E: , it should be jmf Installed directory like C:\Program Files (x86)\JMF2.1.1e\lib\jmf.jar. Hope this will help you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文