3.1 Caveats4. Examples
3.2 Applets
If installing under Win95/NT then run env.bat
Change directory to "orbsrc".
For Borland C++ type make -f bc32.mak
For Visual C++ type nmake -f
ms32.mak
For GNU C++ type make
-f gcc.mak
On Win95/NT 32 this will create ORB.DLL in the "bin" sub-directory and
ORB.LIB in the "lib" sub-directory. On UNIX this will create liborb.a in
the "lib" sub-directory
This part assumes you have installed the product under c:\ercorba
To use this product you should
i.e. set CLASSPATH=c:\ercorba\eridl.jar;c:\ercorba\iiop11.jar;%CLASSPATH%
Type java idl to find out the compiler options.
i.e, c:>java idl -c -d\tmp myidl
will write 'C' language client and server stubs into the directory \tmp
c:>java idl -java -d\tmp myidl
will write Java client and server stubs into the directory \tmp
e.g. To preprocess a file called my.idl using VC++ use the command
cl /EP /Tc<filename> my.idl > my.Ito produce C++ stubs use the command
java idl -c++ my.I
The java stubs produced by the Engine Room IDL compiler are the
portable stubs which are (surprisingly) not always portable between the
various Java ORBs.
Specifically if you wish to use the stubs with the Visigenic/Netscape ORB then you should use the -netscape flag to produce the stubs if your program can throw user defined exceptions as this ORB handles exceptions in a different manner.
Although the idltojava compiler provided by Sun Microsystems produces portable stubs (renamed!) they will not compile with the Engine Room ORB as they have defined some extra abstract operations in the underlying org.omg.CORBA objects
ORBacus produces stubs in the same manner as ERCORBA and appears to
be almost completely compatible. I say almost because there are subtle
differences in the generation of complex type codes so that passing Any
values which contain complex types may result in the receiving ORB not
recognising the incoming value as one that it can handle. This is true
of the other ORBs as well and in general you should avoid mixing and matching
IDL compilers and stubs and Any values with complex types if interoperability
is important.
If you wish to use the Engine Room ORB then it's always possible to
replace the ORB supplied with Netscape Communicator 4 (iiop10.jar) with
the one I supply i.e. iiop11.jar. The Netscape version is found under ...\Netscape\Communicator\Program\Java\Classes\iiop10.jar.
Delete it and copy iiop11.jar into this location.
There are example programs in the sub-directories
samples\c
samples\cpp
For the C or C++ programs, build the test program by typing
make -f bc32.mak
(Borland)
or
nmake -f ms32.mak
(Microsoft VC++)
or
make -f gcc.mak
(GNU C++)
This creates
test1_c.exe or test1_c under UNIX (The client) and
test1_s.exe or test1_s under UNIX (The server)
Run the server and then run the client.
There is an example JAVA program in the sub-directory
samples\java
build the test program by typing
make
Run the the server with
c:>java serverMain
and then run the client with
c:>java client
If you have any trouble running any Java applications check that your PATH and CLASSPATH are correct. If in any doubt then
set CLASSPATH=%your_path%\classes.zip
and run java as %your_path%\bin\java
where %your_path% is where you installed the JDK and run env.bat to
add the JAR's required. Make sure that the JVM (JAVA.EXE in Win32) and
classes.zip are correct for each other otherwise you get exceptions like
"Method not found". I have tested with JDK1.1.6 on Win95/NT and JDK1.1.7
on LINUX. Don't use the the Engine Room ORB with JDK1.2. Use the one provided
with the JDK1.2.
If the bug is still there then e-mail a short description together with a small piece of code exhibiting the problem if possible to mitch_britton@email.com.
Please state the hardware, operating sysyem and compiler version you're
using.