|
|
The idltojava compiler compiles IDL files to Java source code based on IDL to Java mappings defined by the OMG. For more information about the IDL to Java mappings, refer to the topic IDL to Java Mappings Used By the idltojava Compiler.
This topic includes the following sections:
For a quick summary of the enhancements and updates added to the BEA WebLogic Enterprise (WLE) idltojava compiler, see the topic How does the BEA idltojava compiler differ from the Sun Microsystems, Inc. version?
idltojava [idltojava Command Flags] [idltojava Command Options] filename ... m3idltojava [ idltojava Command Flags ] [ idltojava Command Options ] filename ... 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 WebLogic Enterprise 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. (For more information on the mappings, see IDL to Java Mappings Used By the idltojava Compiler.)
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 WLE server. Neither the client nor the server has any of the WLE administrative and infrastructure components, such as tmadmin
, JNDI registration, and ISL/ISH (hence, none of scalability and reliability attributes of WLE)
To run m3idltojava
on server-side IDL files, use the following command:
m3idltojava <flags> <options> <idl-files> 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.
Note:
Several option descriptions have been added here that are not documented in the original Sun Microsystems Inc. idltojava compiler documentation.
Syntax of the idltojava Command
idltojava Command Description
Running idltojava on Client or Joint Client/Server IDL Files
Running m3idltojava on Server Side IDL Files
idltojava Command Options
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.
idltojava Command Flags
Note:
The BEA WLE 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. The line:
#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. The line:
#pragma ID scoped-name "IDL:<path>:<version>"
specifies the repository ID of the identifier scoped-name. This pragma may appear anywhere 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.
Using #pragma in IDL Files
|
Copyright © 1999 BEA Systems, Inc. All rights reserved.
|