JacORB安装及配置指南

原创 2011年01月10日 14:52:00

安装前需要注意,JAVA_HOME配置的路径不能含有空格(例如/Program Files/),另外Ant可以正常使用

1.  svn上下载JacORB-2.3.0-bin.zip(不包含源码)或者JacORB-2.3.0-src.zip(包含源码)

2.  解压的任意目录下,如E:/JacORB

3.  E:/JacORB下新建一个目录classes

4.  添加如下的系统环境变量

1)  JACORB_HOME=E:/JacORB

2)  Path环境变量添加%JACORB_HOME%/bin

3)  Classpath环境变量添加%JACORB_HOME%/lib/idl.jar;%JACORB_HOME%/lib/jacorb.jar;%JACORB_HOME%/lib/logkit-1.2.jar;%JACORB_HOME%/lib/avalon-framework-4.1.5.jar;%JACORB_HOME%/classes;

5.  % JACORB_HOME%下的etc目录有一个文件jacorb_properties.template,将此文件copy到步骤3所新建的classes目录下,并修改文件为jacorb.properties

6.  编辑jacorb.properties文件,将其中的ORBInitRef.NameService对应的键值更改为file:/c:/NS_Ref,如下:

ORBInitRef.NameService=file:/c:/NS_Ref

7.  % JACORB_HOME%下的etc目录有一个文件orb.properties,修改其中的jacorb.config.dir对应的键值为e:/JacORB,如下:

jacorb.config.dir=e:/JacORB

8% JACORB_HOME%下的etc目录有一个文件commom.xml,定位到如下位置:

       <path id="path.base" >

<!--      <pathelement location="${dirs.base}/classes"/> -->

      <pathelement location="${basedir}/classes"/>

      <!-- include all jars located in lib except the jacorb.jar -->

      <fileset dir="${basedir}/lib" >

         <include name="*.jar" />

         <exclude name="jacorb.jar" />

         <!--  

         <exclude name="idl.jar" />

         -->

      </fileset>

      <pathelement path="${java.class.path}"/>

      <pathelement path="${sun.boot.class.path}"/>

   </path>

       修改为粗体部分

9.  定位到% JACORB_HOME%下的bin目录,发现存在下列4个文件:

a)         idl.bat.tpl

b)        idl.tpl

c)         jaco.bat.tpl

d)        jaco.tpl

分别将上述4个文件的tpl后缀去掉(tpl表示template模板,不知为何从官方网站下载的文件会出现这样的问题,不修改直接导致jacorb无法工作)

10.              修改jaco.bat

原先内容:

@JAVA_CMD@ -Djava.endorsed.dirs=@JACORB_HOME@/lib -Djacorb.home=@JACORB_HOME@ -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -classpath %CLASSPATH% %*

修改后为:

JAVA -Djava.endorsed.dirs=%JACORB_HOME%/lib -Djacorb.home=%JACORB_HOME% -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -classpath %CLASSPATH% %*

11.              修改idl.bat

原先内容:

@JAVA_CMD@ -classpath "@JACORB_HOME@/lib/idl.jar;@JACORB_HOME@/lib/logkit-1.2.jar;%CLASSPATH%" org.jacorb.idl.parser %*

修改后为:

JAVA -classpath "%JACORB_HOME%/lib/idl.jar;%JACORB_HOME%/lib/logkit-1.2.jar;%CLASSPATH%" org.jacorb.idl.parser %*

 

完成上述步骤无误后,可以测试一下jacorb是否正确安装,测试步骤如下:

 

1.  命令行窗口定位到% JACORB_HOME%下的demo/grid/目录,输入ant后直接回车开始ant编译,出现BUILD SUCCESSED表示编译成功

2.  这样会进行idl编译server.idl文件,在% JACORB_HOME%/demo/grid/generated下生成corba所需的源文件 ,同时,ant会编译所有的java源文件,% JACORB_HOME%/classes下面生成 .class文件

3.  打开一个命令行窗口,输入nsns.bat,出现如下信息:

C:/Documents and Settings/muning>ns.bat

[jacorb.orb.print_ver] INFO :

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        JacORB V 2.3.0, www.jacorb.org

        (C) The JacORB project 17-Feb-2007

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[jacorb.orb] INFO : Property "jacorb.hashtable_class" is set to: java.util.Hasht

able

[org.jacorb.orb.codes] WARN : Warning - unknown codeset (GBK) - defaulting to IS

O-8859-1

[jacorb.orb.intercept] INFO : InterceptorManager started with 0 Server Intercept

ors, 0 Client Interceptors and 1 IOR Interceptors

[jacorb.orb.singleton] INFO : created ORBSingleton

[jacorb.naming] INFO : NS up

[jacorb.orb] INFO : ORB run

表示JacORB正常启动

4.  打开一个新的命令行窗口,输入jaco demo.grid.Server,出现如下信息:

[jacorb.orb.print_ver] INFO :

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        JacORB V 2.3.0, www.jacorb.org

        (C) The JacORB project 17-Feb-2007

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[jacorb.orb] INFO : Property "jacorb.hashtable_class" is set to: java.util.Hasht

able

[org.jacorb.orb.codes] WARN : Warning - unknown codeset (GBK) - defaulting to IS

O-8859-1

[jacorb.orb.intercept] INFO : InterceptorManager started with 0 Server Intercept

ors, 0 Client Interceptors and 1 IOR Interceptors

[jacorb.poa] INFO : oid:

00 15 23 22 0E 02 3C 18 01 2C 37                            ..#"..<..,7

object is activated

[jacorb.poa] INFO : Using server ID (7483177760) for transient POA

[jacorb.orb.singleton] INFO : created ORBSingleton

[jacorb.orb.giop] INFO : ClientConnectionManager: created new ClientGIOPConnecti

on to 192.168.100.47:1407 (9f671b)

[jacorb.orb.iiop] INFO : Connected to 192.168.100.47:1407 from local port 1409

[jacorb.orb] INFO : ORB run

 

同时在步骤3打开的窗口中出现:

[jacorb.naming] INFO : re-Bound name: grid.example

 

表示测试范例的ORB服务端正常启动

5.  打开一个新的命令行窗口,输入,出现如下信息:

[jacorb.orb.print_ver] INFO :

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        JacORB V 2.3.0, www.jacorb.org

        (C) The JacORB project 17-Feb-2007

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[jacorb.orb] INFO : Property "jacorb.hashtable_class" is set to: java.util.Hasht

able

[org.jacorb.orb.codes] WARN : Warning - unknown codeset (GBK) - defaulting to IS

O-8859-1

[jacorb.orb.intercept] INFO : InterceptorManager started with 0 Server Intercept

ors, 0 Client Interceptors and 1 IOR Interceptors

[jacorb.orb.singleton] INFO : created ORBSingleton

[jacorb.orb.giop] INFO : ClientConnectionManager: created new ClientGIOPConnecti

on to 192.168.100.47:1407 (1db699b)

[jacorb.orb.iiop] INFO : Connected to 192.168.100.47:1407 from local port 1419

[jacorb.orb.giop] INFO : ClientConnectionManager: created new ClientGIOPConnecti

on to 192.168.100.47:1408 (cbf30e)

[jacorb.orb.iiop] INFO : Connected to 192.168.100.47:1408 from local port 1420

Height = 31

Width = 14

Old value at (30,13): 0.21

Setting (30,13) to 470.11

New value at (30,13): 470.11

MyException, reason: This is only a test exception, no harm done :-)

[jacorb.orb] INFO : prepare ORB for shutdown...

[jacorb.orb] INFO : ORB going down...

[jacorb.orb.iiop] INFO : Client-side TCP transport to 192.168.100.47:1408 closed

.

[jacorb.orb.iiop] INFO : Client-side TCP transport to 192.168.100.47:1407 closed

.

[jacorb.orb] INFO : ORB shutdown complete

 

看到这些表示你已经成功的运行了一个极其简单的例子

JacORB 配置

     由于老师要求用JacORB开发一个CORBA应用,于是自己动手配置了一下JacORB。不管是按照前辈们的配置还是老师给的配置方法,始终不成功。费了大半天的时间才配成功。所以把心得写下来,一是...

JBoss教程(学习简明手册) .

这里,我以 jboss-5.1.0.GA JDK1.6 操作系统XP 来说明. jboss-5.1.0.GA下载地址:http://jaist.dl.sourceforg...

JacORB安装及配置指南

安装前需要注意,JAVA_HOME配置的路径不能含有空格(例如/Program Files/),另外Ant可以正常使用 1.  从svn上下载JacORB-2.3.0-bin.zip(不包含源码)或...

JacORB安装及配置指南

 安装前需要注意,JAVA_HOME配置的路径不能含有空格(例如/Program Files/),另外Ant可以正常使用 1.  从svn上下载JacORB-2.3.0-bin.zip(不包含...

JacORB安装及配置

1. 去JacORB官网http://www.jacorb.org/index.html 下载JacORB,本例中使用的是目前的最新版jacorb-3.3-binary。解压到C:\jacorb-3....

JacORB配置步骤

JacORB的应用开发一般分为以下五步:     1.写IDL接口定义编译IDL 2.接口定义生成Java类 3.实现步骤2中生成的接口 4.写服务器启动类,并注册到ORB 5.写客户端去获...

java eclipse平台上配置并使用jacORB2.3.0开发例子的步骤:

 0\ 安装jdk1.6.0,要求:jdk的安装路径里不能包含 空格字符或中文等一些jvm无法识别的字符;     配置环境变量JAVA_HOME=“D:\JavaTool\Java\jdk1...

corba jacorb 配置

  • 2017年01月11日 13:26
  • 7KB
  • 下载

JacORB 配置以及开发

1. reference http://blog.csdn.net/liuhuang007/article/details/5482683 http://hi.baidu.com/%D0%A1%C...
  • nomad2
  • nomad2
  • 2011年08月18日 21:20
  • 1060

JacORB配置步骤

  • 2008年09月03日 16:22
  • 46KB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:JacORB安装及配置指南
举报原因:
原因补充:

(最多只允许输入30个字)