/home/TDDB37/ORB4
directory. In order to access the IDL compilers,
set the PATH environment variable to point to /home/TDDB37/ORB4/bin
:
setenv PATH /home/TDDB37/ORB4/bin:"$PATH"Since the ORBacus distribution was compiled with shared libraries, the
LD_LIBRARY_PATH
environment variable has to be set to point to /home/TDDB37/ORB4/lib
:
setenv LD_LIBRARY_PATH /home/TDDB37/ORB4/lib:"$LD_LIBRARY_PATH"Moreover, because our ORBacus installation was compiled with
gcc-3.2.0
, you'll have to set your programs to use the shared libraries of this compiler:
setenv LD_LIBRARY_PATH /home/TDDB37/gcc-3.2.0/lib:"$LD_LIBRARY_PATH"
/home/TDDB37/gcc-3.2.0/
.
Just make sure that you add the following line to your system configuration before you start compiling your code:
setenv /home/TDDB37/gcc-3.2.0/bin:"$PATH"Also, have a look at the Makefile to understand the compilation process. Take care when compiling programs which use the
NameService
,
as you'll have to indicate the linker to use the appropriate library by adding the flag
-lCosNaming.
Anyway, if you plan to implement the applications in Java 1.2 or higher (we reccomend Java 1.3.1_02), you have to insert in your programs, at the beginning, the following lines of code:
java.util.Properties props = System.getProperties(); props.put("org.omg.CORBA.ORBClass", "com.ooc.CORBA.ORB"); props.put("org.omg.CORBA.ORBSingletonClass", "com.ooc.CORBA.ORBSingleton"); System.setProperties(props);Java 1.2 and later versions have their own ORB developed at JavaSoft, Sun Microsystems. Normally, you can use that ORB instead of ORBacus. We chose ORBacus because it has mappings for both C++ and Java, so you explicitly have to indicate in your program the use of ORBacus, like in the code above taken from the Client.java.
In order for the Java to find the ORBacus implementation, the CLASSPATH
environment variable has to be set to include the ORBacus classes:
setenv CLASSPATH .:/home/TDDB37/ORB4/lib/OB.jar:$CLASSPATH
If you want to run your java applications as applets, have a look at the
Hello.html file generated by the Server.java in the Hello World!
example. Use the "appletviewer instead of netscape to view your applets.
For example, appletviewer Hello.html