Package from the command line

When you package a BlackBerry WebWorks application by using the BlackBerry WebWorks SDK, the app's resources, including a start page (index.html), a config.xml file, icons, and other resources, are used to create one of the following:

  • For BlackBerry 10 apps - a .bar file. You can install the resulting .bar file on the BlackBerry 10 Device Simulator or on a BlackBerry 10 device.
  • For BlackBerry PlayBook OS apps - a .bar file. You can install the resulting .bar file on the BlackBerry Tablet Simulator or on the BlackBerry PlayBook tablet.
  • For BlackBerry 7 or earlier apps - one or more .cod files. You can install the resulting .cod files on the BlackBerry Smartphone Simulator or on a BlackBerry smartphone, just as you would install any other BlackBerry smartphone app.

Although BlackBerry WebWorks apps for BlackBerry 10 and BlackBerry PlayBook tablets are both packaged into .bar files, those .bar files are not compatible across the two operating systems. Please make sure you use the appropriate SDK to package your app for each OS.

When you compile a BlackBerry WebWorks app, the BlackBerry WebWorks Packager performs the following actions:

  1. Validates the contents of the app's archive (.zip) file or app's folder location (for BlackBerry 10 apps only).
  2. Creates the output target folder and cleans up any old files (if necessary).
  3. Creates the source target folder (if specified) and cleans up any old files (if necessary).
  4. For a BlackBerry 10 or BlackBerry tablet app, it creates the .bar file.
  5. For a BlackBerry 7 or earlier app, it creates the following files:
    • .cod file for wireless distribution or distribution from a web page
    • .alx file for distribution using BlackBerry Desktop Manager
    • .jad file for distribution from a web page
    • .cso file for app signing
    • .csl file for app signing
  6. For a signed BlackBerry 7 or earlier app, it updates the .cod file with a signed version.

If your operating system is Windows 7 or Windows Vista, you may need to ensure that bbwp and java are running with administrator access. Otherwise, these executables will not have access to run, and you will encounter errors when you try to build your BlackBerry WebWorks app.

Last modified: 2013-05-02