ASN.1/Java Compiler Overview

Applies to: ASN.1/Java 7.1

Specifying a Java package

By default, the ASN.1 Java compiler creates a Java package whose name derives from the last input .asn file. The output is written into the subdirectory with the same name (converted to lowercase letters) relative to the current directory.

The -output command-line option can be used to specify a different name of the package that may consist of one or several nodes separated by dots. No directory separators (slashes or backslashes) are allowed. The compiler issues an error message if a name that does not conform to the above guidelines is specified.


asn1pjav test.asn -output p1.p2.project

The compiler generates the output files into the p1/p2/project directory relative to the current directory and it creates the directories specified by the output option if they do not exist.

Setting the output directory

To specify the location of the directory where the output Java package is stored, use the -path command-line option. The path cannot include dots.


asn1pjav test.asn -output p.project -path dir1/dir2

The ASN.1 compiler generates the output files into the dir1/dir2/p/project directory relative to the current directory. The directories specified by the -path option must already exist.

This documentation applies to the OSS® ASN.1 Tools for Java release 7.1 and later.

Copyright © 2017 OSS Nokalva, Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise, without the prior permission of OSS Nokalva, Inc.
Every distributed copy of the OSS® ASN.1 Tools for Java is associated with a specific license and related unique license number. That license determines, among other things, what functions of the OSS ASN.1 Tools for Java are available to you.