Microsoft SDK for Java

Msjavah Options

This section describes the command-line options that can be used with msjavah.

/classpath <pathname>

Sets an alternate class path to search in addition to the CLASSPATH environment variable.

/ctors

Generates inline wrapper methods for constructing new Java objects through the execute_java_constructor API. This option is similar to /helpers; incompatible changes to constructors result in compilation errors rather than run-time errors.

/d <directory>

Specifies an output directory to place the header files. This option is ignored if the file name used with the /o option includes absolute pathnames.

/helpers

Generates inline wrapper methods for making static and non-static Java calls through the execute_java_dynamic_method and execute_java_static_method RNI APIs. The /helpers option allows incompatible changes to a Java method's signature to result in compilation errors rather than run-time errors.

/noclinit

Does not run class initializers in any specified classes. By default, msjavah attempts to run initializers. If the initializers fail, a warning message is displayed and the class is reloaded without running the initializers.

/nocppconsts

Generates C++ const declarations for static final fields.

/nologo

Suppresses the Microsoft copyright message.

/nowarn

Suppresses warning messages.

/nowritebarrier

Produces headers without const declarations of object member fields. Newer implementations of the Java garbage collector require all members of objects that are object references be modified with the GCSetObjectReferenceForObject API. As a result, these fields are generated as const fields. Pragmas for the Microsoft compilers are generated to disable the appropriate warnings encountered when the compiler fails to generate default constructors. To ensure portability, the /portable option suppresses these pragmas.

/o <outfile>

Specifies the output filename of the header file. By default, a separate header name is generated for each class name based on the class name. With this option specified, all classes are generated in the header file specified by <outfile>.

/portable

Generates headers without enhancements specific to the Microsoft compiler (pragmas and so on).

/v

Specifies verbose output.

/?

Displays msjavah usage information including a list of available options.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.