Java Reference
In-Depth Information
compiler supports a - td switch that directs where the output should be gener-
ated. In order to keep the IDL-generated files separate from our implementation
files, we direct the output to a directory called idlfiles , parallel to the src
and build directories. The command line to compile the IDL file is
idlj -fall -td idlfiles src/server.idl
The idlj compiler is even smart enough to create the idlfiles directory if
it doesn't already exist. The -fall switch instructs the compiler to output both
client and server support files. If omitted, then -fclient is assumed, generating
only the client-side support files, an option that might be desired if one were
creating only a CORBA client to connect to an already existing CORBA server.
After running the idlj compiler, and assuming that we've already created the
empty src directory tree structure, the directory structure appears as shown
here:
javatech-chapter-19/
(build and run scripts, etc.)
src/
server.idl
javatech/
cor19/
client/
server/
impl/
idlfiles/
javatech/
cor19/
(1 IDL-generated file)
server/
(13 IDL-generated files)
build/
classes/
The build/classes tree will not exist yet either, but we show it here for com-
pleteness. When completed, there will be javatech/cor19/server/impl
and javatech/cor19/client trees below build/classes .
The several IDL-generated files are of little interest to the developer. They
are mainly used internally by the CORBA system. In order to create the imple-
mentation files, the programmer needs only to have knowledge of the interfaces
defined in server.idl and the standard way in which CORBA works. A brief
listing of the files and their purposes is given in Table 19.1. There is also a
COR19 - CONSTANT.java file in the javatech.cor19 directory one level
up, corresponding to the IDL constant COR19 - CONSTANT.
 
Search WWH ::




Custom Search