[jacorb-developer] Use of -i2jpackage to rename package names

Magne Mæhre magne.mahre at gmail.com
Mon May 7 14:35:05 CEST 2018


Hi.
I was trying to apply -i2jpackage to map a module navn hierarchy to (a
different) java package name.  In my test case it renamed the sequences,
but not structs and interfaces, which struck me as weird (?)

The IDL file has nested modules, to create namespaces in the C++ server
(tao_idl doesn't seem to allow setting a namespace prefix).  In Java, I
would like different names, to adher to the more common domain name based
naming scheme.

module A {
module B {
module C {
  struct myStruct {
      string strValue;
  };

  typedef sequence<myStruct> sqMyStruct;

  interface myInterface {
      void callMe ();
  };

}; // module C
}; // module B
}; // module A

When I compile this with  idl -i2jpackage A.B.C:org.hytra.C  module1.idl,
the sqMyStruct [Helper|Holder] is placed in "package org.hytra.C" (as I
expected), while the rest of the generated files are put in "package A.B.C"
(as was NOT expected)

I might have misunderstood something here?

Any clues?

--Magne


More information about the jacorb-developer mailing list