1

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.

Community
  • 1
  • 1
cod3monk3y
  • 9,508
  • 6
  • 39
  • 54

1 Answers1

1

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).

cod3monk3y
  • 9,508
  • 6
  • 39
  • 54
  • To also add most people only have 32bit version of flash player installed. This maybe because 64bit flash player does not exist, is badly maintained, does not exist for all platforms, due to Windows IE historically not having good 64bit versions of all popular plugins. But good to see QtWebKit in use for this purpose. – Darryl Miles Jul 22 '13 at 16:42