prompt> idl2irA list of options appears. For example:
Usage: idl2ir [-options] files...
where options include:
-ir <name> The name of the interface repository
-replace Replace definitions, instead of updating them
idl2ir [ options ] infile.idl
idl2ir
command takes an IDL file as input, binds itself to an interface repository server and populates the repository with the IDL constructs contained in infile. If the repository already contains an item with the same name as an item in the IDL file, the old item will not be updated unless you use the -replace
option.
NOTE:
The idl2ir
command does not handle anonymous arrays or sequences
properly. To work around this problem, typedefs must be used for all
sequences and arrays.
Example
idl2ir -ir my_repository -replace java_examples/bank/Bank.idl
idl2java
This command generates Java source code from an IDL source file.
Syntax
idl2java [ options ] filename.idl
Description
The idl2java
command, a Java-based preprocessor, compiles an IDL source file and creates a directory structure containing the Java mappings for the IDL declarations. Typically, one .IDL
file will be mapped to many .java
files because Java allows only one public interface or class per file. IDL file names must end with the .IDL extension.
The supported preprocessor arguments, standard for most preprocessors, are shown in the table that follows. Refer to your preprocessor's documentation to find more information about arguments.
Example
idl2java -verbose bank.idl
irep
This command starts an interface repository server.
Syntax
irep [ options ] irep_name [ IDL_storage_file ]
Description
The irep
command starts an interface repository server that manages a database containing detailed descriptions of IDL interfaces. The required argument irep_name specifies the instance name of the repository server. The optional argument IDL_storage_file specifies the storage file to use. The repository's database includes interface names, inheritance structure, supported operations, and arguments. The interface repository can consist of multiple databases and may be loaded using the idl2ir
command.
Option | Description |
---|---|
-console |
Runs irep as a console application.
|
Example
irep -console my_server
java2idl
This command creates an IDL file from a Java class file (in Java byte code). You can enter one or more Java class file names. If you enter more than one filename, include spaces between the file names.
NOTE: To use this command, you must have a virtual machine supporting JDK 1.1.
java2idl [ options ] filename
.class
files represented by filename. You might want to use this when you have existing Java byte code and want to create an IDL file from it so it can be used with some other programming language such as C++, COBOL, or Smalltalk.
Option | Description |
---|---|
-verbose | Turns verbose mode on. |
Account.class
, Client.class
, and Server.class
.
java2idl Account Client Server
.class
extension. For example, to compile a file named Bank.class
, enter:
java2iiop Bank
NOTE: To use this command, you must have a virtual machine supporting JDK 1.1.
java2iiop [ options ] filename
java2iiop
if you have existing Java byte code that you wish to adapt to use distributed objects or if you do not have the time to learn IDL. The filename argument specifies the file or files from which to generate files using IIOP. By using java2iiop
, you can generate the necessary container classes, client stubs, and server skeletons from Java byte code.
Example
The following command compiles class files named Account.class
, Client.class
, and Server.class
without generating tie code.
java2iiop -no_tie Account Client Server
Last Updated: 02/04/98 14:19:14
Any sample code included above is provided for your use on an "AS IS" basis, under the Netscape License Agreement - Terms of Use