customer ant task for compiling IDL files
I set up a customer ant task for compiling a number of idl files automatically.
in my task class say "PrepareIDL.java", I import "com.sun.tools.corba.se.idl.toJavaPortable.Compile" and call "Compile.main( String[] args);" in a loop that browse through a directory and pick out idl files recursively. idl files are passed through argument "args"
I launch the task in netbeans, but it always gives a lot of errors like this:
D:\K15\copyofclient\Client\sources\src\corba\backend\CCE\AssemblyFactory.idl (line 20): java.io.FileNotFoundException: cce/ComponentServer.idl
#include <cce/ComponentServer.idl>
So I listed all the elements in the args array in Compile.main(String[] args) and it gives:
-i
src/corba/backend
-fclient
-td
src/java-generated
-pkgPrefix
CCE
com.tektronix.k15essa.client.backend.corba
D:\K15\copyofclient\Client\sources\src\corba\backend\CCE\AssemblyFactory.idl
I type in the idlj commands on the command line from my project folder with exactly the same listed arguments, it compiles the idl file successfully. This proves that the include path is ok, but the PrepareIDL program just keeps giving errors. Is there any implied difference between idlj command and calling Compile class?
cheers