rtiddsgen java output directory

2 posts / 0 new
Last post
Offline
Last seen: 3 weeks 2 days ago
Joined: 05/04/2023
Posts: 5
rtiddsgen java output directory

 

I am having an issue with the rtiddsgen for java.  

My code gen script sets the package and the destination directory which I believe is what I want to do,  the generated code then ends up with an unexpected extra directory.For example, I am expecting  ./idl_gen/MyRecord.java  and I get ./idl_gen/idl_gen/MyRecord.java.  If I manual move the generated directories I can compile and run Java project.   Is there something I am missing? 

Here is a snippet of my code gen script:

echo "Procssing idl files from $PWD into ${IDL_GEN_DIR}"
rtiddsgen -d ${IDL_GEN_DIR} -language Java -package idl_gen -replace *.idl

Organization:
Offline
Last seen: 1 week 5 hours ago
Joined: 12/05/2019
Posts: 10

Hello sander66,

The two flags of relevance here are "-d" and "-package": "-d" sets the output directory, whereas "-package" sets the package output for Java code.
Thus, when using both of these with the value of "idl_gen", you're getting the expected result.

You can think of these as a "package prefix" ("-d", like "src/main" for Maven/Gradle projects) and a "package full name" ("-package", like "com.example")
Does this make sense to you?

Regards,
Alejandro