Thanks. Given that, I found these, which list more %% vars.
https://www.b4x.com/android/forum/threads/b4x-comment-links.119897/
https://www.b4x.com/android/forum/threads/comment-links-with-date-and-time.132262/#post-834861
However when I tried %ADDITIONAL%
#CustomBuildAction: 2, %JAVABIN%\java.exe, -jar %ADDITIONAL%\compiletime.jar
The compiler fails with
Running custom action. Error
Error: Unable to access jarfile %ADDITIONAL%\compiletime.jar
If I swap in the full path, it does work.
Going back to -jar %ADDITIONAL%\compiletime.jar; if I put the jar in the B4A subfolder of the additional libraries folder, it still errors.
Checking file properties on the jar there is a security notice, which I unblocked, but still doesn't work.
I also tried %B4X%, same error.
-jar %B4X%\compiletime.jar
And even %PROJECT% gives the same error.
It would seem the environment variables do not work in that CBA parameter location, or I need more help. Only filesystem paths are working, including absolute and relative paths. The following does work, with the jar in the project folder, as does the full path.
-jar ..\compiletime.jar
Using B4A 10.70.