Jacorb的配置问题

从JacORB官方网站上下载最新版本的JacORB,解压到本机,例如:D:/JacORB,具体配置过程如下:1 将D:/JacORB/etc目录下的jacorb_properties.template文件拷贝到D:/JacORB/classes目录下,并更 名为jacorb.properties,这个是JacORB的配置文件,用写字板打开这个文件,找到下面四行:
#ORBInitRef.NameService=corbaloc::160.45.110.41:38693/StandardNS/NameServer-POA/_root
#ORBInitRef.NameService=file:/c:/NS_Ref
ORBInitRef.NameService=http://www.x.y.z/~user/NS_Ref
#ORBInitRef.TradingService=http://www.x.y.z/~user/TraderRef
改为:
#ORBInitRef.NameService=corbaloc::160.45.110.41:38693/StandardNS/NameServer-POA/_root
ORBInitRef.NameService=file:/c:/NS_Ref
#ORBInitRef.NameService=http://www.x.y.z/~user/NS_Ref
#ORBInitRef.TradingService=http://www.x.y.z/~user/TraderRef
2 修改D:/JacORB/bin目录下的几个批处理文件:(我们假设你的jre路径为D:/jre)
    (1)jacotemplate.bat更名为jaco.bat,编辑如下:
@echo off
set JACORB_HOME=D:/jacorb
set JAVA_HOME=D:/jre
set path=%JAVA_HOME%/bin;%path%
set CLASSPATH=%JAVA_HOME%/lib/rt.jar
set CLASSPATH=%JACORB_HOME%/lib/antlr-2.7.2.jar;%JACORB_HOME%/lib/avalon-framework-4.1.5.jar;%JACORB_HOME%/lib/concurrent-1.3.2.jar;%JACORB_HOME%/lib/idl.jar;%JACORB_HOME%/lib/jacorb.jar;%JACORB_HOME%/lib/logkit-1.2.jar;%JACORB_HOME%/lib/picocontainer-1.2-021105.jar;%JACORB_HOME%/lib/wrapper-3.1.0.jar;%JACORB_HOME%/classes;%CLASSPATH%
rem call java interpreter
java    -cp %CLASSPATH% -Djacorb.home=%JACORB_HOME% -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton %*
    (2)idltemplate.bat更名为idl.bat(idl文件编译器),编辑如下:
@echo off
set JACORB_HOME=D:/jacorb
set JAVA_HOME=D:/jre
set path=%JAVA_HOME%/bin;%path%
set CLASSPATH=%JAVA_HOME%/lib/rt.jar
set CLASSPATH=%JACORB_HOME%/lib/antlr-2.7.2.jar;%JACORB_HOME%/lib/avalon-framework-4.1.5.jar;%JACORB_HOME%/lib/concurrent-1.3.2.jar;%JACORB_HOME%/lib/idl.jar;%JACORB_HOME%/lib/jacorb.jar;%JACORB_HOME%/lib/logkit-1.2.jar;%JACORB_HOME%/lib/picocontainer-1.2-021105.jar;%JACORB_HOME%/lib/wrapper-3.1.0.jar;%JACORB_HOME%/classes;%CLASSPATH%
%JAVA_HOME%/bin/java      -cp    %CLASSPATH%    org.jacorb.idl.parser %*

    (3)ns.bat以及ntfy.bat,编辑,将jaco前加上路径,即D:/JacORB/bin/jaco
至此,配置完成,运行ns.bat,可见成功启动了CORBA命名服务。成功,Yeah

你可能感兴趣的:(java,File,Path,编译器)