blob: 2ed5652bc63abea77775104efdf54c892518be3b [file] [log] [blame]
bpatel4bf512b2011-05-11 08:30:46 -07001." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
duke6e45e102007-12-01 00:00:00 +00002." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3."
4." This code is free software; you can redistribute it and/or modify it
5." under the terms of the GNU General Public License version 2 only, as
6." published by the Free Software Foundation.
7."
8." This code is distributed in the hope that it will be useful, but WITHOUT
9." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11." version 2 for more details (a copy is included in the LICENSE file that
12." accompanied this code).
13."
14." You should have received a copy of the GNU General Public License version
15." 2 along with this work; if not, write to the Free Software Foundation,
16." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17."
ohair2283b9d2010-05-25 15:58:33 -070018." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19." or visit www.oracle.com if you need additional information or have any
20." questions.
duke6e45e102007-12-01 00:00:00 +000021."
bpatel4bf512b2011-05-11 08:30:46 -070022.TH idlj 1 "10 May 2011"
duke6e45e102007-12-01 00:00:00 +000023
24.LP
tbell16c34dd2009-05-04 18:28:26 -070025.SH "Name"
duke6e45e102007-12-01 00:00:00 +000026idlj \- The IDL\-to\-Java Compiler
27.LP
bpatel4bf512b2011-05-11 08:30:46 -070028\f3idlj\fP generates Java bindings from a given IDL file.
duke6e45e102007-12-01 00:00:00 +000029.SH "Synopsis"
30.LP
duke6e45e102007-12-01 00:00:00 +000031.nf
32\f3
33.fl
34idlj [ \fP\f3options\fP\f3 ] \fP\f4idl\-file\fP\f3
35.fl
36\fP
37.fi
38
39.LP
40.LP
41where \f2idl\-file\fP is the name of a file containing Interface Definition Language (IDL) definitions. \f2Options\fP may appear in any order, but must precede the \f2idl\-file\fP.
42.LP
43.SH "Description"
44.LP
duke6e45e102007-12-01 00:00:00 +000045.LP
tbell16c34dd2009-05-04 18:28:26 -070046The IDL\-to\-Java Compiler generates the Java bindings for a given IDL file.\ For binding details, see the
47.na
48\f2OMG IDL to Java Language Language Mapping Specification\fP @
49.fi
bpatel4bf512b2011-05-11 08:30:46 -070050http://download.oracle.com/javase/7/docs/technotes/guides/idl/mapping/jidlMapping.html. Some previous releases of the IDL\-to\-Java compiler were named \f2idltojava\fP.
51.LP
duke6e45e102007-12-01 00:00:00 +000052.SS
53Emitting Client and Server Bindings
54.LP
bpatel4bf512b2011-05-11 08:30:46 -070055.LP
56To generate Java bindings for an IDL file named My.idl:
57.LP
58.nf
59\f3
60.fl
61idlj My.idl
62.fl
63\fP
64.fi
duke6e45e102007-12-01 00:00:00 +000065
66.LP
duke6e45e102007-12-01 00:00:00 +000067.LP
bpatel4bf512b2011-05-11 08:30:46 -070068This generates the client\-side bindings and is equivalent to:
duke6e45e102007-12-01 00:00:00 +000069.LP
bpatel4bf512b2011-05-11 08:30:46 -070070.nf
71\f3
72.fl
73idlj \fP\f3\-fclient\fP My.idl
74.fl
75.fi
76
duke6e45e102007-12-01 00:00:00 +000077.LP
bpatel4bf512b2011-05-11 08:30:46 -070078.LP
79The client\-side bindings do not include the server\-side skeleton. If you want to generate the server\-side bindings for the interfaces:
80.LP
81.nf
82\f3
83.fl
84idlj \fP\f3\-fserver\fP My.idl
85.fl
86.fi
87
88.LP
89.LP
90Server\-side bindings include the client\-side bindings plus the skeleton, all of which are \f2POA\fP (that is, Inheritance Model) classes. If you want to generate both client and server\-side bindings, use one of the following (equivalent) commands:
91.LP
92.nf
93\f3
94.fl
95idlj \fP\f3\-fclient \-fserver\fP My.idl
96.fl
97idlj \f3\-fall\fP My.idl
98.fl
99.fi
100
duke6e45e102007-12-01 00:00:00 +0000101.LP
102.LP
103There are two possible server\-side models: the Inheritance Model and the Tie Delegation Model.
104.LP
105.LP
106The default server\-side model is the \f2Portable Servant Inheritance Model\fP. Given an interface \f2My\fP defined in \f2My.idl\fP, the file \f2MyPOA.java\fP is generated. You must provide the implementation for \f2My\fP and it must inherit from \f2MyPOA\fP.
107.LP
108.LP
tbell16c34dd2009-05-04 18:28:26 -0700109\f2MyPOA.java\fP is a stream\-based skeleton that extends
110.na
111\f2org.omg.PortableServer.Servant\fP @
112.fi
bpatel4bf512b2011-05-11 08:30:46 -0700113http://download.oracle.com/javase/7/docs/api/org/omg/PortableServer/Servant.html and implements the \f2InvokeHandler\fP interface and the operations interface associated with the IDL interface the skeleton implements.
duke6e45e102007-12-01 00:00:00 +0000114.LP
115.LP
tbell16c34dd2009-05-04 18:28:26 -0700116The \f2PortableServer\fP module for the
117.na
118\f2Portable Object Adapter (POA)\fP @
119.fi
bpatel4bf512b2011-05-11 08:30:46 -0700120http://download.oracle.com/javase/7/docs/technotes/guides/idl/POA.html defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior.
duke6e45e102007-12-01 00:00:00 +0000121.LP
122.LP
123Another option for the Inheritance Model is to use the \f2\-oldImplBase\fP flag in order to generate server\-side bindings that are compatible with versions of the Java programming language prior to J2SE 1.4. Note that using the \f2\-oldImplBase\fP flag is non\-standard: these APIs are being deprecated. You would use this flag ONLY for compatibility with existing servers written in J2SE 1.3. In that case, you would need to modify an existing MAKEFILE to add the \f2\-oldImplBase\fP flag to the \f2idlj\fP compiler, otherwise POA\-based server\-side mappings will be generated. To generate server\-side bindings that are backwards compatible:
124.LP
bpatel4bf512b2011-05-11 08:30:46 -0700125.nf
126\f3
127.fl
128idlj \fP\f3\-fclient \-fserver\fP \f3\-oldImplBase\fP My.idl
129.fl
130idlj \f3\-fall\fP \f3\-oldImplBase\fP My.idl
131.fl
132.fi
133
duke6e45e102007-12-01 00:00:00 +0000134.LP
bpatel4bf512b2011-05-11 08:30:46 -0700135.LP
136Given an interface \f2My\fP defined in \f2My.idl\fP, the file \f2_MyImplBase.java\fP is generated. You must provide the implementation for \f2My\fP and it must inherit from \f2_MyImplBase\fP.
137.LP
duke6e45e102007-12-01 00:00:00 +0000138.LP
139The other server\-side model is called the Tie Model. This is a delegation model. Because it is not possible to generate ties and skeletons at the same time, they must be generated separately. The following commands generate the bindings for the Tie Model:
140.LP
bpatel4bf512b2011-05-11 08:30:46 -0700141.nf
142\f3
143.fl
144idlj \fP\f3\-fall\fP My.idl
145.fl
146idlj \f3\-fallTIE\fP My.idl
147.fl
148.fi
149
duke6e45e102007-12-01 00:00:00 +0000150.LP
bpatel4bf512b2011-05-11 08:30:46 -0700151.LP
152For the interface \f2My\fP, the second command generates \f2MyPOATie.java\fP. The constructor to \f2MyPOATie\fP takes a \f2delegate\fP. In this example, using the default POA model, the constructor also needs a \f2poa\fP. You must provide the implementation for \f2delegate\fP, but it does not have to inherit from any other class, only the interface \f2MyOperations\fP. But to use it with the ORB, you must wrap your implementation within \f2MyPOATie\fP. For instance:
153.LP
duke6e45e102007-12-01 00:00:00 +0000154.nf
155\f3
156.fl
157 ORB orb = ORB.init(args, System.getProperties());
158.fl
159
160.fl
161 // Get reference to rootpoa & activate the POAManager
162.fl
163 POA rootpoa = (POA)orb.resolve_initial_references("RootPOA");
164.fl
165 rootpoa.the_POAManager().activate();
166.fl
167
168.fl
169 // create servant and register it with the ORB
170.fl
171 MyServant myDelegate = new MyServant();
172.fl
173 myDelegate.setORB(orb);
174.fl
175
176.fl
177 // create a tie, with servant being the delegate.
178.fl
179 MyPOATie tie = new MyPOATie(myDelegate, rootpoa);
180.fl
181
182.fl
183 // obtain the objectRef for the tie
184.fl
185 My ref = tie._this(orb);
186.fl
187\fP
188.fi
189
190.LP
bpatel4bf512b2011-05-11 08:30:46 -0700191.LP
192You might want to use the Tie model instead of the typical Inheritance model if your implementation must inherit from some other implementation. Java allows any number of interface inheritance, but there is only one slot for class inheritance. If you use the inheritance model, that slot is used up . By using the Tie Model, that slot is freed up for your own use. The drawback is that it introduces a level of indirection: one extra method call occurs when invoking a method.
193.LP
duke6e45e102007-12-01 00:00:00 +0000194.LP
195To generate server\-side, Tie model bindings that are compatible with versions of the IDL to Java language mapping in versions prior to J2SE 1.4.
196.LP
bpatel4bf512b2011-05-11 08:30:46 -0700197.nf
198\f3
199.fl
200idlj \fP\f3\-oldImplBase\fP \f3\-fall\fP My.idl
201.fl
202idlj \f3\-oldImplBase\fP \f3\-fallTIE\fP My.idl
203.fl
204.fi
205
duke6e45e102007-12-01 00:00:00 +0000206.LP
207.LP
208For the interface \f2My\fP, this will generate \f2My_Tie.java\fP. The constructor to \f2My_Tie\fP takes a \f2impl\fP. You must provide the implementation for \f2impl\fP, but it does not have to inherit from any other class, only the interface \f2HelloOperations\fP. But to use it with the ORB, you must wrap your implementation within \f2My_Tie\fP. For instance:
209.LP
210.nf
211\f3
212.fl
213 ORB orb = ORB.init(args, System.getProperties());
214.fl
215
216.fl
217 // create servant and register it with the ORB
218.fl
219 MyServant myDelegate = new MyServant();
220.fl
221 myDelegate.setORB(orb);
222.fl
223
224.fl
225 // create a tie, with servant being the delegate.
226.fl
227 MyPOATie tie = new MyPOATie(myDelegate);
228.fl
229
230.fl
231 // obtain the objectRef for the tie
232.fl
233 My ref = tie._this(orb);
234.fl
235\fP
236.fi
237
238.LP
duke6e45e102007-12-01 00:00:00 +0000239.SS
240Specifying Alternate Locations for Emitted Files
241.LP
bpatel4bf512b2011-05-11 08:30:46 -0700242.LP
243If you want to direct the emitted files to a directory other than the current directory, invoke the compiler as:
244.LP
245.nf
246\f3
247.fl
248idlj \fP\f3\-td /altdir\fP My.idl
249.fl
250.fi
duke6e45e102007-12-01 00:00:00 +0000251
252.LP
duke6e45e102007-12-01 00:00:00 +0000253.LP
duke6e45e102007-12-01 00:00:00 +0000254For the interface \f2My\fP, the bindings will be emitted to \f2/altdir/My.java\fP, etc., instead of \f2./My.java\fP.
bpatel4bf512b2011-05-11 08:30:46 -0700255.LP
duke6e45e102007-12-01 00:00:00 +0000256.SS
257Specifying Alternate Locations for Include Files
258.LP
bpatel4bf512b2011-05-11 08:30:46 -0700259.LP
260If \f2My.idl\fP included another idl file, \f2MyOther.idl\fP, the compiler assumes that \f2MyOther.idl\fP resides in the local directory. If it resides in \f2/includes\fP, for example, then you would invoke the compiler with the following command:
261.LP
262.nf
263\f3
264.fl
265idlj \fP\f3\-i /includes\fP My.idl
266.fl
267.fi
duke6e45e102007-12-01 00:00:00 +0000268
269.LP
duke6e45e102007-12-01 00:00:00 +0000270.LP
bpatel4bf512b2011-05-11 08:30:46 -0700271If \f2My.idl\fP also included \f2Another.idl\fP that resided in \f2/moreIncludes\fP, for example, then you would invoke the compiler with the following command:
duke6e45e102007-12-01 00:00:00 +0000272.LP
bpatel4bf512b2011-05-11 08:30:46 -0700273.nf
274\f3
275.fl
276idlj \fP\f3\-i /includes \-i /moreIncludes\fP My.idl
277.fl
278.fi
279
280.LP
281.LP
282Since this form of include can become irritatingly long, another means of indicating to the compiler where to search for included files is provided. This technique is similar to the idea of an environment variable. Create a file named \f2idl.config\fP in a directory that is listed in your CLASSPATH. Inside of \f2idl.config\fP, provide a line with the following form:
283.LP
284.nf
285\f3
286.fl
287includes=/includes;/moreIncludes
288.fl
289\fP
290.fi
291
292.LP
duke6e45e102007-12-01 00:00:00 +0000293.LP
tbell16c34dd2009-05-04 18:28:26 -0700294The compiler will find this file and read in the includes list. Note that in this example the separator character between the two directories is a semicolon (;). This separator character is platform dependent. On the Windows platform, use a semicolon, on the Unix platform, use a colon, etc. For more information on \f2includes\fP, see the
295.na
296\f2Setting the Classpath\fP @
297.fi
bpatel4bf512b2011-05-11 08:30:46 -0700298http://download.oracle.com/javase/7/docs/technotes/tools/index.html#general.
299.LP
duke6e45e102007-12-01 00:00:00 +0000300.SS
301Emitting Bindings for Include Files
302.LP
bpatel4bf512b2011-05-11 08:30:46 -0700303.LP
304By default, only those interfaces, structs, etc, that are defined in the idl file on the command line have Java bindings generated for them. The types defined in included files are not generated. For example, assume the following two idl files:
305.LP
duke6e45e102007-12-01 00:00:00 +0000306
307.LP
duke6e45e102007-12-01 00:00:00 +0000308.LP
bpatel4bf512b2011-05-11 08:30:46 -0700309\f4My.idl\fP
duke6e45e102007-12-01 00:00:00 +0000310.LP
bpatel4bf512b2011-05-11 08:30:46 -0700311.nf
312\f3
313.fl
314#include <MyOther.idl>
315.fl
316interface My
317.fl
318{
319.fl
320};
321.fl
322\fP
323.fi
324
duke6e45e102007-12-01 00:00:00 +0000325.LP
bpatel4bf512b2011-05-11 08:30:46 -0700326
duke6e45e102007-12-01 00:00:00 +0000327.LP
duke6e45e102007-12-01 00:00:00 +0000328.LP
bpatel4bf512b2011-05-11 08:30:46 -0700329\f4MyOther.idl\fP
duke6e45e102007-12-01 00:00:00 +0000330.LP
bpatel4bf512b2011-05-11 08:30:46 -0700331.nf
332\f3
333.fl
334interface MyOther
335.fl
336{
337.fl
338};
339.fl
340\fP
341.fi
342
duke6e45e102007-12-01 00:00:00 +0000343.LP
bpatel4bf512b2011-05-11 08:30:46 -0700344
duke6e45e102007-12-01 00:00:00 +0000345.LP
duke6e45e102007-12-01 00:00:00 +0000346.LP
bpatel4bf512b2011-05-11 08:30:46 -0700347The following command will only generate the java bindings for \f2My\fP:
duke6e45e102007-12-01 00:00:00 +0000348.LP
bpatel4bf512b2011-05-11 08:30:46 -0700349.nf
350\f3
351.fl
352idlj My.idl
353.fl
354\fP
355.fi
356
duke6e45e102007-12-01 00:00:00 +0000357.LP
bpatel4bf512b2011-05-11 08:30:46 -0700358.LP
359To generate all of the types in \f2My.idl\fP and all of the types in the files that \f2My.idl\fP includes (in this example, \f2MyOther.idl\fP), use the following command:
360.LP
361.nf
362\f3
363.fl
364idlj \fP\f3\-emitAll\fP My.idl
365.fl
366.fi
367
368.LP
369.LP
370There is a caveat to the default rule. \f2#include\fP statements which appear at global scope are treated as described. These \f2#include\fP statements can be thought of as import statements. \f2#include\fP statements which appear within some enclosing scope are treated as true \f2#include\fP statements, meaning that the code within the included file is treated as if it appeared in the original file and, therefore, Java bindings are emitted for it. Here is an example:
371.LP
372
373.LP
374.LP
375\f4My.idl\fP
376.LP
377.nf
378\f3
379.fl
380#include <MyOther.idl>
381.fl
382interface My
383.fl
384{
385.fl
386 #include <Embedded.idl>
387.fl
388};
389.fl
390\fP
391.fi
392
393.LP
394
395.LP
396.LP
397\f4MyOther.idl\fP
398.LP
399.nf
400\f3
401.fl
402interface MyOther
403.fl
404{
405.fl
406};
407.fl
408\fP
409.fi
410
411.LP
412
413.LP
414.LP
415\f4Embedded.idl\fP
416.LP
417.nf
418\f3
419.fl
420enum E {one, two, three};
421.fl
422\fP
423.fi
424
425.LP
426
427.LP
428.LP
429Running the following command:
430.LP
431.nf
432\f3
433.fl
434idlj My.idl
435.fl
436\fP
437.fi
438
439.LP
440.LP
441will generate the following list of Java files:
442.LP
443.nf
444\f3
445.fl
446./MyHolder.java
447.fl
448./MyHelper.java
449.fl
450./_MyStub.java
451.fl
452./MyPackage
453.fl
454./MyPackage/EHolder.java
455.fl
456./MyPackage/EHelper.java
457.fl
458./MyPackage/E.java
459.fl
460./My.java
461.fl
462\fP
463.fi
464
465.LP
466.LP
467Notice that \f2MyOther.java\fP was not generated because it is defined in an import\-like \f2#include\fP. But \f2E.java\fP \f2was\fP generated because it was defined in a true \f2#include\fP. Also notice that since \f2Embedded.idl\fP was included within the scope of the interface \f2My\fP, it appears within the scope of \f2My\fP (that is,in \f2MyPackage\fP).
468.LP
duke6e45e102007-12-01 00:00:00 +0000469.LP
470If the \f2\-emitAll\fP flag had been used in the previous example, then all types in all included files would be emitted.
471.LP
duke6e45e102007-12-01 00:00:00 +0000472.SS
473Inserting Package Prefixes
474.LP
bpatel4bf512b2011-05-11 08:30:46 -0700475.LP
476Suppose that you work for a company named ABC that has constructed the following IDL file:
477.LP
duke6e45e102007-12-01 00:00:00 +0000478
479.LP
duke6e45e102007-12-01 00:00:00 +0000480.LP
bpatel4bf512b2011-05-11 08:30:46 -0700481\f4Widgets.idl\fP
duke6e45e102007-12-01 00:00:00 +0000482.LP
bpatel4bf512b2011-05-11 08:30:46 -0700483.nf
484\f3
485.fl
486module Widgets
487.fl
488{
489.fl
490 interface W1 {...};
491.fl
492 interface W2 {...};
493.fl
494};
495.fl
496\fP
497.fi
498
duke6e45e102007-12-01 00:00:00 +0000499.LP
bpatel4bf512b2011-05-11 08:30:46 -0700500
501.LP
502.LP
503Running this file through the IDL\-to\-Java compiler will place the Java bindings for \f2W1\fP and \f2W2\fP within the package \f2Widgets\fP. But there is an industry convention that states that a company's packages should reside within a package named \f2com.<company name>\fP. The \f2Widgets\fP package is not good enough. To follow convention, it should be \f2com.abc.Widgets\fP. To place this package prefix onto the \f2Widgets\fP module, execute the following:
504.LP
505.nf
506\f3
507.fl
508idlj \fP\f3\-pkgPrefix Widgets com.abc\fP Widgets.idl
509.fl
510.fi
511
512.LP
513.LP
514If you have an IDL file which includes \f2Widgets.idl\fP, the \f2\-pkgPrefix\fP flag must appear in that command also. If it does not, then your IDL file will be looking for a \f2Widgets\fP package rather than a \f2com.abc.Widgets\fP package.
515.LP
duke6e45e102007-12-01 00:00:00 +0000516.LP
517If you have a number of these packages that require prefixes, it might be easier to place them into the \f2idl.config\fP file described above. Each package prefix line should be of the form:
518.LP
bpatel4bf512b2011-05-11 08:30:46 -0700519.nf
520\f3
521.fl
522PkgPrefix.<type>=<prefix>
523.fl
524\fP
525.fi
526
duke6e45e102007-12-01 00:00:00 +0000527.LP
bpatel4bf512b2011-05-11 08:30:46 -0700528So the line for the above example would be:
529.nf
530\f3
531.fl
532PkgPrefix.Widgets=com.abc
533.fl
534\fP
535.fi
536
duke6e45e102007-12-01 00:00:00 +0000537.LP
538.LP
539The use of this option does not affect the Repository ID.
540.LP
duke6e45e102007-12-01 00:00:00 +0000541.SS
542Defining Symbols Before Compilation
543.LP
bpatel4bf512b2011-05-11 08:30:46 -0700544.LP
545You may need to define a symbol for compilation that is not defined within the IDL file, perhaps to include debugging code in the bindings. The command
546.LP
547.nf
548\f3
549.fl
550idlj \fP\f3\-d\fP MYDEF My.idl
551.fl
552.fi
duke6e45e102007-12-01 00:00:00 +0000553
554.LP
duke6e45e102007-12-01 00:00:00 +0000555.LP
556is the equivalent of putting the line \f2#define MYDEF\fP inside \f2My.idl\fP.
bpatel4bf512b2011-05-11 08:30:46 -0700557.LP
duke6e45e102007-12-01 00:00:00 +0000558.SS
559Preserving Pre\-Existing Bindings
560.LP
bpatel4bf512b2011-05-11 08:30:46 -0700561.LP
562If the Java binding files already exist, the \f2\-keep\fP flag will keep the compiler from overwriting them. The default is to generate all files without considering if they already exist. If you've customized those files (which you should not do unless you are very comfortable with their contents), then the \f2\-keep\fP option is very useful. The command
563.LP
564.nf
565\f3
566.fl
567idlj \fP\f3\-keep\fP My.idl
568.fl
569.fi
duke6e45e102007-12-01 00:00:00 +0000570
571.LP
duke6e45e102007-12-01 00:00:00 +0000572.LP
bpatel4bf512b2011-05-11 08:30:46 -0700573emits all client\-side bindings that do not already exist.
574.LP
duke6e45e102007-12-01 00:00:00 +0000575.SS
576Viewing Progress of Compilation
577.LP
bpatel4bf512b2011-05-11 08:30:46 -0700578.LP
579The IDL\-to\-Java compiler will generate status messages as it progresses through its phases of execution. Use the \f2\-v\fP option to activate this "verbose" mode:
580.LP
581.nf
582\f3
583.fl
584idlj \fP\f3\-v\fP My.idl
585.fl
586.fi
duke6e45e102007-12-01 00:00:00 +0000587
588.LP
duke6e45e102007-12-01 00:00:00 +0000589.LP
590By default the compiler does not operate in verbose mode.
bpatel4bf512b2011-05-11 08:30:46 -0700591.LP
duke6e45e102007-12-01 00:00:00 +0000592.SS
593Displaying Version Information
594.LP
duke6e45e102007-12-01 00:00:00 +0000595.LP
596To display the build version of the IDL\-to\-Java compiler, specify the \f2\-version\fP option on the command\-line:
597.LP
bpatel4bf512b2011-05-11 08:30:46 -0700598.nf
599\f3
600.fl
601idlj \-version
602.fl
603\fP
604.fi
605
duke6e45e102007-12-01 00:00:00 +0000606.LP
607.LP
608Version information also appears within the bindings generated by the compiler. Any additional options appearing on the command\-line are ignored.
609.LP
duke6e45e102007-12-01 00:00:00 +0000610.SH "Options"
611.LP
duke6e45e102007-12-01 00:00:00 +0000612.RS 3
613.TP 3
614\-d symbol
615This is equivalent to the following line in an IDL file:
duke6e45e102007-12-01 00:00:00 +0000616.nf
617\f3
618.fl
619#define \fP\f4symbol\fP\f3
620.fl
621\fP
622.fi
duke6e45e102007-12-01 00:00:00 +0000623.TP 3
624\-emitAll
625Emit all types, including those found in \f2#include\fP files.
626.TP 3
627\-fside
628Defines what bindings to emit. \f2side\fP is one of \f2client\fP, \f2server\fP, \f2serverTIE\fP, \f2all\fP, or \f2allTIE\fP. The \f2\-fserverTIE\fP and \f2\-fallTIE\fP options cause delegate model skeletons to be emitted. Assumes \f2\-fclient\fP if the flag is not specified.
629.TP 3
630\-i include\-path
631By default, the current directory is scanned for included files. This option adds another directory.
632.TP 3
633\-keep
634If a file to be generated already exists, do not overwrite it. By default it is overwritten.
635.TP 3
636\-noWarn
637Suppresses warning messages.
638.TP 3
639\-oldImplBase
640Generates skeletons compatible with pre\-1.4 JDK ORBs. By default, the POA Inheritance Model server\-side bindings are generated. This option provides backward\-compatibility with older versions of the Java programming language by generating server\-side bindings that are \f2ImplBase\fP Inheritance Model classes.
641.TP 3
642\-pkgPrefix type prefix
643Wherever \f2type\fP is encountered at file scope, prefix the generated Java package name with \f2prefix\fP for all files generated for that type. The \f2type\fP is the simple name of either a top\-level module, or an IDL type defined outside of any module.
644.TP 3
645\-pkgTranslate type package
bpatel4bf512b2011-05-11 08:30:46 -0700646Whenever the module name \f2type\fP is encountered in an identifier, replace it in the identifier with \f2package\fP for all files in the generated Java package. Note that \f2pkgPrefix\fP changes are made first. \f2type\fP is the simple name of either a top\-level module, or an IDL type defined outside of any module, and must match the full package name exactly.
647.br
648.br
duke6e45e102007-12-01 00:00:00 +0000649If more than one translation matches an identifier, the longest match is chosen. For example, if the arguments include:
650.nf
651\f3
652.fl
653 \-pkgTranslate foo bar \-pkgTranslate foo.baz buzz.fizz
654.fl
655\fP
656.fi
duke6e45e102007-12-01 00:00:00 +0000657The following translations would occur:
658.nf
659\f3
660.fl
661foo => bar
662.fl
663foo.boo => bar.boo
664.fl
665foo.baz => buzz.fizz
666.fl
667foo.baz.bar => buzz.fizz.bar
668.fl
669\fP
670.fi
duke6e45e102007-12-01 00:00:00 +0000671The following package names cannot be translated:
672.RS 3
673.TP 2
674o
675\f2org\fP
676.TP 2
677o
678\f2org.omg\fP or any subpackages of \f2org.omg\fP
679.RE
bpatel4bf512b2011-05-11 08:30:46 -0700680Any attempt to translate these packages will result in uncompilable code, and the use of these packages as the first argument after \f2\-pkgTranslate\fP will be treated as an error.
duke6e45e102007-12-01 00:00:00 +0000681.TP 3
682\-skeletonName xxx%yyy
683Use \f2xxx%yyy\fP as the pattern for naming the skeleton. The defaults are:
684.RS 3
685.TP 2
686o
687%POA for the \f2POA\fP base class (\f2\-fserver\fP or \f2\-fall\fP)
688.TP 2
689o
690_%ImplBase for the \f2oldImplBase\fP class (\f2\-oldImplBase\fP and (\f2\-fserver\fP or \f2\-fall\fP))
691.RE
692.TP 3
693\-td dir
694Use \f2dir\fP for the output directory instead of the current directory.
695.TP 3
696\-tieName xxx%yyy
697Name the tie according to the pattern. The defaults are:
698.RS 3
699.TP 2
700o
701%POATie for the \f2POA\fP tie base class (\f2\-fserverTie\fP or \f2\-fallTie\fP)
702.TP 2
703o
704%_Tie for the \f2oldImplBase\fP tie class (\f2\-oldImplBase\fP and (\f2\-fserverTie\fP or \f2\-fallTie\fP))
705.RE
706.TP 3
707\-nowarn, \-verbose
708Verbose mode.
709.TP 3
710\-version
711Display version information and terminate.
712.RE
713
714.LP
duke6e45e102007-12-01 00:00:00 +0000715.LP
bpatel4bf512b2011-05-11 08:30:46 -0700716See the Description section for more option information.
717.LP
718.SH "Restrictions:"
duke6e45e102007-12-01 00:00:00 +0000719.LP
720.RS 3
721.TP 2
722o
723Escaped identifiers in the global scope may not have the same spelling as IDL primitive types, \f2Object\fP, or \f2ValueBase\fP. This is because the symbol table is pre\-loaded with these identifiers; allowing them to be redefined would overwrite their original definitions. (Possible permanent restriction).
724.TP 2
725o
726The \f2fixed\fP IDL type is not supported.
727.RE
728
729.LP
730.SH "Known Problems:"
731.LP
duke6e45e102007-12-01 00:00:00 +0000732.RS 3
733.TP 2
734o
735No import generated for global identifiers. If you invoke on an unexported local impl, you do get an exception, but it seems to be due to a \f2NullPointerException\fP in the \f2ServerDelegate\fP DSI code.
736.RE
737
738.LP
duke6e45e102007-12-01 00:00:00 +0000739