Why does the ASN.1 Java Compiler generate filenames longer than 255 characters? The javac compiler will not accept them.

The level of nesting is the direct result of the depth of the SEQUENCEs and CHOICEs within some ASN.1 specifications. The OSS ASN.1 Tools provides a feature which you can use to rename types. By employing directives to shorten NonCriticalExtensions to NCE in various very deeply nested CHOICEs, you can get javac to accept the OSS generated .java files.

See the attached file with such directives, shorterNames.gen, and a sample 3GPP RRC ASN.1 schema rrc.asn.

To use it from the command line, just add it to the list of input files, for example

asn1pjav -root -uper shorterNames.gen rrc.asn

If you prefer the ASN.1 Studio GUI, add shorterNames.gen to your project and recompile.

For more information, see the OSS.TYPENAME directive description.


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.



Contact Support
contact Our office hours
24 hours/day, 7 days/week

  • Phone: 1-888-OSS-2761 (USA and Canada)
  • Phone: 1-732-302-9669 (International)
  • Fax: 1-732-302-0023
  • Email: support@oss.com
Free Trial
download

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.




Learn ASN.1
Learn ASN.1

Our expert personnel can help you learn ASN.1!

We offer 4-day ASN.1 courses at our headquarters or your premises.