I was trying to compile the sample WebWorks application for the BlackBerry Playbook and immediately ran into a problem:-
[INFO] Parsing command line options
[INFO] Parsing bbwp.properties
[INFO] Validating WebWorks archive
[INFO] Parsing config.xml
[WARNING] Failed to find a element
[INFO] Populating application source
[INFO] Compiling WebWorks application
Error loading: c:\Program Files\Java\jdk1.6.0_22\jre\bin\server\jvm.dll
[INFO] Packaging the bar file
java.io.FileNotFoundException: C:\Users\ABDULR~1\AppData\Local\Temp\widgetGen.15
125699001299362608489.tmp\sketchPadStandard.swf (The system cannot find the file
specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at net.rim.tumbler.file.FileManager.copyFile(Unknown Source)
at net.rim.tumbler.airpackager.AirPackager.run(Unknown Source)
at net.rim.tumbler.WidgetPackager.go(Unknown Source)
at net.rim.tumbler.WidgetPackager.main(Unknown Source)
[ERROR] Air Packager exception occurred
The problem turned out to be the JDK being used. Instead of using the one within the WebWorks SDK, the system JDK was being used. The correct JDK can be specified using the JAVA_HOME environment variable:-
bbwp>set JAVA_HOME="c:\Program Files (x86)\Research In Motion\BlackBerry Web
Works Packager for PlayBook\jre"