Class Component Structure of CAP for JC2.2.X

Dear JavaCard Society,

During implementation of JavaCard for smart card OS I met some contradiction between specification and real CAP file format. The matter is inclass component structure inside CAP file.

JCVM2.2.2 and JCVM2.2.1 declare it as

class_component{

u1 tag

u2 size

u2 signature_pool_length

type_descriptor signature_pool[]

interface_info interfaces[]

class_info classes[]

}

However JCVM2.1.1 declares it as

class_component{

u1 tag

u2 size

interface_info interfaces[]

class_info classes[]

}

The problem is that JC2.2.X converter generates CAP file without declaredsignature_pool_length andsignature_pool. So it means that JC2.2.X converter generates CAP file according to JC2.2.1 format.

Any comments or opinions are much appreciated.

Thanks

[1023 byte] By [Dmitri_Shorina] at [2007-11-27 8:14:29]
# 1

>The problem is that JC2.2.X converter generates CAP file without declared signature_pool_length and signature_pool. So it means that JC2.2.X converter generates CAP file according to JC2.2.1 format.

You mean 2.1.1. Yes, the CAP file formats differ in this point. Normally a JCVM is one version backward compatible. It can react upon receiving the JC version in the Header component (2.1 for JC 2.1.1, 2.2 for JC2.2.1 and 2.3 for JC2.2.2) .

lexdabeara at 2007-7-12 19:59:04 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2

Dear lexdabear,

Thank you for your advice. As you told JC2.2.2 converter generates CAP file with version header.major_version=2 and header.minor_version=1 which means that CAP file structure is according to JC2.1.1. So the worst thing for me is I can not test my implementation with JC2.2.2 CAP file. Because nothing is able generating it.

Dmitri_Shorina at 2007-7-12 19:59:04 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3
You could use the JCOP Tools to generate a JC 2.2.1 CAP file and then change the major/minor version from 2.2 to 2.3 by hand. It should work since the CAP file structure remained unchanged.
lexdabeara at 2007-7-12 19:59:04 > top of Java-index,Java Mobility Forums,Consumer and Commerce...