If your ASN1C license purchase includes support for BER or PER encoding, it may also include support for Java Micro Edition. You may find the following additional JAR files in your installation's java folder:
asn1rt-jme-ber.jar: ASN1C Java ME runtime with support for BER
asn1rt-jme-per.jar: ASN1C Java ME runtime with support for PER
When using ASN1C generated code on a Java Micro Edition platform, observe the following:
Use option -cldc instead of -java. The generated code should be compatible with CLDC 1.1.
Do NOT use any of the following ASN1C compiler options: -print -events -trace. These are not supported with CLDC 1.1.
Your client code may use either one of two approaches for referring to classes such as ArrayList, which are not present in CLDC 1.1:
explicitly import objsys.asn1j.runtime.ArrayList. Your code will only be compatible with our Java ME support jar.
import java.util.* and objsys.asn1j.runtime.*. You code may be used in Java SE or Java ME environment. You must make sure that only one class named ArrayList is available on your classpath when compiling. If compiling for Java SE, do not include the ASN1C Java ME runtime JAR. If compiling for Java ME, use the CLDC 1.1 JAR (from the Java ME SDK) in your bootclasspath and include the ASN1C Java ME runtime JAR in your classpath.
Asn1BigInteger and Asn1BigDecimal are not supported.
Using the same generated code on both Java SE and Java ME CLDC 1.1 is not supported. Compile your ASN.1 specification once for Java SE and once for Java ME.
Note that we have not tested using Java ME Connected Device Configuration (CDC) rather than CLDC.