idlj(1) Java IDLRMI-IIOP idlj(1) idlj - (IDL)Java idlj [ options ] idlfile options optionsidlfile idlfile (IDL) IDL-to-JavaIDLJavahttp://docs.oracle.com/javase/8/docs/technotes/guides/idl/mapping/jidlMapping.html Java IDL: JavaIDL IDL-to-Javaidltojava idljMy.idlIDL idlj My.idl idlj -fclient My.idl POA () idlg -fserver My.idl ()1 idlj -fclient -fserver My.idl idlj -fall My.idl 2TieTie . My.idlMyMyPOA.javaMyMyMyPOAMyPOA.javahttp://docs.oracle.com/javase/8/docs/api/org/omg/PortableServer/Servant.html org.omg.PortableServer.Servant MyIDLcallHandler (POA)PortableServerServanthttp://docs.oracle.com/javase/8/docs/technotes/guides/idl/POA.html (POA) JavaServantJavaorg.omg.PortableServer.ServantPOAPOA 1-oldImplBaseJava SE 1.4Java-oldImplBaseAPIJava SE 1.3make-oldImplBaseidljPOA idlj -fclient -fserver -oldImplBase My.idl idlj -fall -oldImplBase My.idl My.idlMy_MyImplBase.javaMyMy_MyImplBase Tie. 1TieTieTie idlj -fall My.idl idlj -fallTIE My.idl My2MyPOATie.javaMyPOATiedelegatePOAPOAdelegateMyOperationsORBMyPOATie ORB orb = ORB.init(args, System.getProperties()); // Get reference to rootpoa & activate the POAManager POA rootpoa = (POA)orb.resolve_initial_references("RootPOA"); rootpoa.the_POAManager().activate(); // create servant and register it with the ORB MyServant myDelegate = new MyServant(); myDelegate.setORB(orb); // create a tie, with servant being the delegate. MyPOATie tie = new MyPOATie(myDelegate, rootpoa); // obtain the objectRef for the tie My ref = tie._this(orb); TieJava1Tie11 Java SE 1.4JavaIDLTie idlj -oldImplBase -fall My.idl idlj -oldImplBase -fallTIE My.idl MyMy_Tie.javaMy_TieimplimplHelloOperationsORBMy_Tie ORB orb = ORB.init(args, System.getProperties()); // create servant and register it with the ORB MyServant myDelegate = new MyServant(); myDelegate.setORB(orb); // create a tie, with servant being the delegate. MyPOATie tie = new MyPOATie(myDelegate); // obtain the objectRef for the tie My ref = tie._this(orb); idlj -td /altdir My.idl My./My.java/altdir/My.java My.idlidlMyOther.idlMyOther.idl/includes idlj -i /includes My.idl /moreIncludesAnother.idlMy.idl idlj -i /includes -i /moreIncludes My.idl includeCLASSPATHidl.configidl.config includes=/includes;/moreIncludes (;)WindowsSolarisLinuxOS X idlJava2idl My.idl file: #include interface My { }; MyOther.idl file: interface MyOther { }; #include#include#include#includeJava My.idl file: #include interface My { #include }; MyOther.idl file: interface MyOther { }; Embedded.idl enum E {one, two, three}; idlj My.idl Java#includeMyOther.java#includeE.javaEmbedded.idlMyMy(MyPackage)-emitAll ./MyHolder.java ./MyHelper.java ./_MyStub.java ./MyPackage ./MyPackage/EHolder.java ./MyPackage/EHelper.java ./MyPackage/E.java ./My.java ABCIDL Widgets.idl file: module Widgets { interface W1 {...}; interface W2 {...}; }; IDL-to-JavaW1W2JavaWidgetscom.com.abc.WidgetsWidgets idlj -pkgPrefix Widgets com.abc Widgets.idl Widgets.idlIDL-pkgPrefixIDLcom.abc.WidgetsWidgets idl.configPkgPrefix.=PkgPrefix.Widgets=com.abcID IDLidlj -d MYDEF My.idl My.idl#define MYDEF Java-keep()-keepidlj -keep My.idl IDL-to-Java-vidlj -v My.idl IDL-to-Javaidlj -version-version -d symbol IDL #define symbol -demitAll #include -fside sideclientserverserverTIEallallTIE-fserverTIE-fallTIE-fclient -i include-path -i keep -noWarn -oldImplBase 1.4JDK ORBPOAImplBaseJava -pkgPrefix type prefix typeJavaprefixtypeIDL -pkgTranslate type package typeJavapackagepkgPrefixtypeIDL : pkgTranslate type pkg -pkgTranslate type2.baz pkg2.fizz : type => pkg type.ext => pkg.ext type.baz => pkg2.fizz type2.baz.pkg => pkg2.fizz.pkg orgorg.omgorg.omg-pkgTranslate -skeletonName xxx%yyy xxx%yyyPOA%POA (-fserver-fall)oldImplBase_%ImplBase (-oldImplBase)(-fserver-fall)) -td dir dir -tieName xxx%yyy xxx%yyyPOA%POA (-fserverTie-fallTie)oldImplBase tie_%Tie (-oldImplBase)(-fserverTie-fallTie)) -nowarn-verbose -version IDLObjectValueBase fixedIDL implServerDelegate DSINullPointerException JDK 8 20131121 idlj(1)