This question applies to PKCS and other standards as well. You can put class files in a common package by compiling the pkcs-1 and pkcs-8 together:
asn1pjav -root -o com.name.pkcs pkcs-1.asn pkcs-8.asn
Note the use of the -root option to instruct the ASN.1 compiler that all input modules are root modules. Otherwise, the compiler will treat PKCS-1 as a helper module for PKCS-8 and since PKCS-8 does not import any types from the PKCS-1, it will not generate any PKCS-1 classes. Alternatively, you can specify the set of root modules via the OSS.ROOT standard directive.
The samples included with some of the Knowledge Center answers are meant for your general understanding of the OSS products. Different versions of the products might produce slightly different outputs. Consult the products documentation and samples for the most up-to-date products information and code examples.
Test drive the OSS Nokalva ASN.1, LTE, and XML Tools now! Your trial includes complete software, documentation, sample programs, free 24x7 technical support and more.
Our expert personnel can help you learn ASN.1!
We offer 4-day ASN.1 courses at our headquarters or your premises.