jflashplayer中的java.lang.UnsatisfiedLinkError - getOSVersion [英] java.lang.UnsatisfiedLinkError in jflashplayer -- getOSVersion

查看:254
本文介绍了jflashplayer中的java.lang.UnsatisfiedLinkError - getOSVersion的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译并运行的试用版本附带的示例代码JFlashPlayer 2.1.1 。 (对不起,下载链接,似乎 VersaEdge



2009年我能够获得一个演示版,但是我由于 java.lang.UnsatisfiedLinkError com.jpackages.jflashplayer.FlashPanel.getOSVersion 。我正在运行Windows 7 64位,而且我不使用Internet Explorer。我猜测要么VersaEdge没有更新JFlashPlayer来支持Windows 7或IE的一些组件。当谈到编译Java时,这是一个彻头彻尾的白痴。也许我错过了类路径或其他明显的命令行开关。

我已经使用它们的批处理文件 buildClasses.bat code>,即:

$ p $ javac -d classes -classpath ..\\jflashplayer.jar Example.java

然后我运行应用程序使用

 java -cp classes; .. \jflashplayer.jar示例

。例外的全文:

 线程main中的异常java.lang.UnsatisfiedLinkError:com.jpackages.jflashplayer.FlashPanel .getOSVersion(I)I 
at com.jpackages.jflashplayer.FlashPanel.getOSVersion(Native Method)
at com.jpackages.jflashplayer.FlashPanel.n(Unknown Source)
at com.jpackages (Example.java:94)
(Example。 main(Example.java:425)

任何帮助表示感谢!感谢Java的大师!

编辑

有几个DLL和一个 runExample.bat 在试用文件夹的根目录下。批处理文件运行

  java -classpath jflashplayer.jar;示例/类示例

,并给出了同样的 UnsatisfiedLinkError 。我尝试了包括我的路径中的当前目录来协助JNI搜索,但这并没有改变任何东西。

编辑2



我不确定要查找哪个DLL。从2006年发现了一篇伟大(但古老)的文章描述了运行示例的所有复杂性。没有运气。最后的JFlashPlayer版本是在2009年的某个时候由 readme.txt 。所以我很确定这是一个平台不支持的问题。

接下来的问题是,如何在Java中托管SWF?但我会保存这个问题的后续问题。

寻找替代解决方案的小时后,我碰到 QT-Jambi ,它有一个WebKit组件,它是应支持Flash 。它也是积极开发,真正跨平台的,而JFlashPlayer已经死了,并绑定到Windows / IE / ActiveX插件。

奇怪的是,安装QTJambi后,我有与JFlashPlayer相同的问题,并找出我最初的错误是试图在64位JRE中运行一个32位应用程序。所以,确保我已经安装了32位JRE,我将它的位置添加到了我的路径前面。 set path = c:\ Program Files(x86)\Java\jre7\bin;%path%

>其中java
c:\程序文件(x86)\Java\jre7\bin\java.exe
C:\Windows\System32\java.exe
C :\ Program Files \Java\jdk1.6.0_31\bin\java.exe

并从命令行执行该批处理文件,并且该示例运行正常。



最终,像QTJambi(或 QtWebKit )对我来说比较好,我感谢我对于找到更加绿色牧场的迂回方式缺乏java知识。


$ b

其他的,不太方便的解决方案是 WebKit for SWT (仅适用于Windows)和 JWebPane 。/ $ rel =nofollow>

I'm attempting to compile and run the Example code that comes with the trial version of JFlashPlayer 2.1.1. (Sorry for the download link, it appears that VersaEdge has discontinued JFlashPlayer)

I was able to get a demo running back in 2009, but I'm unable to get the app running now due to a java.lang.UnsatisfiedLinkError to com.jpackages.jflashplayer.FlashPanel.getOSVersion. I'm running Windows 7 64-bit, and I do not use Internet Explorer. I'm guessing either VersaEdge didn't update JFlashPlayer to support Windows 7 or some components from IE are missing.

Also, I'm a seasoned C# developer, but I'm a downright blabbering idiot when it comes to compiling Java. Maybe I'm missing a classpath or other obvious command line switch.

I've compiled the classes using their batch file buildClasses.bat, which is:

javac -d classes -classpath ..\jflashplayer.jar Example.java

and then I run the app using

java -cp classes;..\jflashplayer.jar Example

. The full text of the exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.jpackages.jflashplayer.FlashPanel.getOSVersion(I)I
    at com.jpackages.jflashplayer.FlashPanel.getOSVersion(Native Method)
    at com.jpackages.jflashplayer.FlashPanel.n(Unknown Source)
    at com.jpackages.jflashplayer.FlashPanel.installFlash(Unknown Source)
    at Example.createFlashPanel(Example.java:94)
    at Example.<init>(Example.java:141)
    at Example.main(Example.java:425)

Any help appreciated! Thanks Java gurus!

EDIT

There are several DLLs and a runExample.bat in the root of the trial folder. The batch file runs

java -classpath jflashplayer.jar;example/classes Example

and gives me the same UnsatisfiedLinkError. I tried including the current directory in my path to assist the JNI search, but that did not change anything. I'm not sure what DLL it's looking for.

EDIT 2

Found a great (yet ancient) article from 2006 that describes all the intricacies of getting the example running. No luck. The last JFlashPlayer release was sometime in 2009 judging by the readme.txt, and Windows7 was released Oct 22 2009. So I'm fairly certain this is a platform-not-supported issue.

The follow up question is, then, how do I host a SWF in Java? But I'll save that for a follow-up question.

解决方案

After searching for hours for an alternative solution, I came across QT-Jambi which has a WebKit component which should support Flash. It is also actively developed and truly cross-platform, whereas JFlashPlayer is both dead and bound to Windows/IE/ActiveX plugins.

Oddly, after installing QTJambi, I had the same problem as with JFlashPlayer and figured out my original mistake was trying to run a 32-bit app in a 64-bit JRE. So, ensuring that I had a 32-bit JRE installed, I added its location to the front of my path

> set path=c:\Program Files (x86)\Java\jre7\bin;%path%

> where java
c:\Program Files (x86)\Java\jre7\bin\java.exe
C:\Windows\System32\java.exe
C:\Program Files\Java\jdk1.6.0_31\bin\java.exe

and executed the batch file from the command line, and the example ran fine.

Ultimately a WebKit solution like QTJambi (or QtWebKit) is better for me, and I thank my lack of knowledge of java for that roundabout way of finding greener pastures.

Other, not so handy solutions are WebKit for SWT (Windows only) and JWebPane (vaporware).

这篇关于jflashplayer中的java.lang.UnsatisfiedLinkError - getOSVersion的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆