HOWTO: Compile an application that uses a security provider
Notice Information in this article applies to Excelsior JET versions 2.5 through 4.1. For version 4.5 and above, see article #29.
To enable the use of security providers in JET-compiled applications, their implementing JARs must be handled in a special way, namely they should be packed to the resulting executable as a whole.
An example of using the BouncyCastle security provider  can be found in the Supplemental Downloads section.
Typically, security provider APIs check their implementing classes for consistency at run-time. Therefore the original security provider classes should be available to the running application. The JET Optimizer provides an option to pack JARs into executables, which can be used to pack a security provider JAR.
To do this, perform the following steps:
- On the "Classes" page of JET Control Panel add the security provider JAR to the classpath and force it into the compilation set.
- On the "Resources" page, select that JAR in the resourcepath and select the "Pack entire jar/zip file" button. Note for the users of Excelsior JET 3.7 and below: in Excelsior JET prior to version 4.0 this option is called "Bind with classes".
- BouncyCastle security provider http://www.bouncycastle.org
- JET User’s Guide https://www.excelsior-usa.com/doc/jet/jetw.html, The JET Control Panel, Step 3: Selecting classes to compile, Step 4: Resources.
- Excelsior JET User’s Guide (https://www.excelsiorjet.com/docs), Chapter “Application Considerations”, section “Resource packing”.
Article ID: 5
Last Revised On: 25-Jul-2006