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.