Tuxedo
0

Command Reference

 Previous Next Contents View as PDF  

idltojava(1)

Name

idltojava—Compiles IDL files to Java source code based on IDL to Java mappings defined by the OMG.

Synopsis

idltojava [idltojava Command Flags] [idltojava Command Options] filename ...
m3idltojava [idltojava Command Flags] [idltojava Command Options] filename ... 

To run idltojava on Client-side IDL files, use the following command:

idltojava <flags> <options> <idl-files>

The idltojava command requires a C++ pre-processor, and is used to generate deprecated names. The command idltojava generates Java code as is appropriate for the client-side ORB.

Note: A remote joint client/server is a client that implements server objects to be used as callback objects. The server role of the remote joint client/server is considerably less robust than that of a CORBA server. Neither the client nor the server has any of the BEA Tuxedo system administrative and infrastructure components, such as tmadmin, JNDI registration, and ISL/ISH (hence, none of scalability and reliability attributes of BEA Tuxedo ATMI system).

To run m3idltojava on Server-side IDL files, use the following command:

m3idltojava <flags> <options> <idl-files>

Note: The m3idltojava compiler was deprecated in BEA Tuxedo release 8.0. BEA recommends using the idltojava compiler to generate client stubs for CORBA Java clients and CORBA Java joint client/servers.

The server-side ORB is built to use non-deprecated names. The command m3idltojava generates Java code using non-deprecated names as is appropriate for the server-side ORB.

Description

The idltojava command compiles IDL source code into Java source code. You then use the javac compiler to compile that source to Java bytecodes.

The command idltojava is used to translate IDL source code into generic client stubs and generic server skeletons which can be used for callbacks. The command m3idltojava is used to translate IDL into generic client stubs and CORBA server skeletons.

The IDL declarations from the named IDL files are translated to Java declarations according to the mappings specified in the OMG IDL to Java mappings.

The idltojava compiler provided with the BEA Tuxedo system CORBA environment includes several enhancements, extensions and additions that are not present in the original Sun Microsystems, Inc. version of the compiler. The BEA Tuxedo system specific revisions are summarized here.

The BEA Tuxedo system idltojava compiler:

Options

Note: Several option descriptions have been added here that are not documented in the original Sun Microsystems Inc. idltojava compiler documentation.

Option

Description

-j javaDirectory

Specifies that generated Java files should be written to the given javaDirectory. This directory is independent of the -p option, if any.

-J filesFile

Specifies that a list of the files generated by idltojava should be written to filesFile

-p package-name

Specifies the name of an outer package to enclose all the generated Java. It has the same function as #pragma javaPackage.

You must include an outer package. The compiler does not do this for you. If you do not have an outer package, the idltojava compiler will still generate Java files for you but you will get a Java compiler error when you try to compile the *.java files.

The following options are identical to the equivalent C/C++ compiler options (cpp):

-I directory

Specifies a directory or path to be searched for files that are #included in IDL files. This option is passed to the preprocessor.

-D symbol

Specifies a symbol to be defined during preprocessing of the IDL files. This option is passed to the preprocessor.

-U symbol

Specifies a symbol to be undefined during preprocessing of the IDL files. This option is passed to the preprocessor.


 

Command Flags

The flags can be turned on by specifying them as shown, and they can be turned off by prefixing them with the letters no-. For example, to prevent the C preprocessor from being run on the input IDL files, use -fno-cpp.

The table below includes descriptions of all flags.


 

Flag

Description

-flist-flags

Requests that the state of all the -f flags be printed. The default value of this flag is off.

-flist -debug-flags

Provides a list of debugger flags

-fcaseless

Request that case not be significant in keywords and identifiers. The default value of this flag is on.

-fclient

Requests the generation of the client side of the IDL files supplied. The default value of this flag is off.

-fcpp

Requests that the idl source be run through the C/C++ preprocessor before being compiled by the idltojava compiler. The default value of this flag is on.

-fignore-duplicates

Specifies that duplicate definitions be ignored. This may be useful if compiling multiple idl files at one time. The default value of this flag is off.

-flist-options

Lists the options specified on the command line. The default value of this flag is off.

-fmap-included-files

Specifies that java files be generated for definitions included by #include preprocessor directives. The default value for this flag is off which specifies that the java files for included definitions not be generated.

-fserver

Requests the generation of the server side of the IDL files supplied. The default value of this flag is off.

-fverbose

Requests that the compiler comment on the progress of the compilation. The default value of this flag is off.

-fversion

Requests that the compiler print its version and timestamp. The default value of this flag is off.

-fwarn-pragma

Requests that warning messages be issued for unknown or improperly specified #pragma's. The default value of this flag is on.

-fwrite-files

Requests that the derived java files be written. The default value of this flag is on. You might specify -fno-write-files if you wished to check for errors without actually writing the files.


 

Notes

The BEA Tuxedo system idltojava compiler processes #pragma somewhat differently from the Sun Microsystems, Inc. idltojava compiler.

RepositoryPrefix="prefix"

A default repository prefix can also be requested with the line #pragma prefix "requested prefix" at the top-level in the IDL file itself.

#pragma javaPackage "package"

Wraps the default package in one called package. For example, compiling an IDL module M normally creates a Java package M. If the module declaration is preceded by:

#pragma javaPackage browser

the compiler will create the package M inside package browser. This pragma is useful when the definitions in one IDL module will be used in multiple products. The command line option -p can be used to achieve the same result

#pragma ID scoped-name "IDL:<path>:<version>"

Specifies the repository ID of the identifier scoped-name. This pragma may appear any where in an IDL file. If the pragma appears inside a complex type such as structure or union then only as much of scoped-name need be specified to specify the element. A scoped-name is of the form outer_name::name::inner_name. The <path>component of the repository id is a series of identifiers separated by forward slashes (/). The <version>component is a decimal number MM.mm, where MM is the major version number and mm is the minor version number.

 

Back to Top Previous Next
Contact e-docsContact BEAwebmasterprivacy