Design Rules for a Java Card Application with Large Method Component

In compact CAP files, the Method Component is limited to a 64 KB size. This can be a constraint if an application has many features, if a library has a large API, or if it is too large to fit into that size after conversion.

The extended CAP file offers a solution to this by creating a Method Component that has a maximum size of eight megabytes. For large applications, the extended mode is preferable.

The Converter splits the large Method Component into blocks, each with a maximum size of 64 KB. It is important to note that methods cannot be divided between two blocks and all exception handlers for a method must be contained in the same block of the method code. Because of this, when programming large Java Card applications for extended CAPs, the method code size must not be too large and specialization pattern must be used whenever possible.