Search code examples
blackberryblackberry-eclipse-pluginblackberry-webworks

Using a 3rd party library inside a WebWorks Javascript extension?


Usually, when creating a WebWorks Javascript extension you export your source files into a JAR with the appropriate provisions (e.g. library.xml, *.java). Usually, 3rd party libraries are in a jar file with compiled java code. I included the 3rd party jar inside my custom extension. This creates a jar within a jar file structure. The Blackberry Widget packager (bbwp) opens up the jar and compiles the Java files to be used in your WebWorks application. Blackberry's Java compiler is unable to compile because the appropriate packages are not visible in the class-path at the time of compilation. The appropriate packages are in the 3rd party library jar included in the extensions jar. Does anyone know how to resolve this class-path issue? Do I need the 3rd party source files instead of a jar? Is there documentation on how the BlackBerry Widget Packager (bbwp) works?

Thanks in advance.


Solution

  • Follow the instructions "Use precompiled classes in an extension" listed in the following link. That should resolve the compilation issue.

    Creating a JAR file that defines your extension