The relative path for generated files matches the relative path for input files. Since you specified src/calculator4/Calculator.g4
as the input file, the output files will be src/calculator4/*.java
.
- Change directories so the working directory is the same folder where
Calculator.g4
is. - Remove the
-lib src/calculator4
argument. - Change the
-o
argument to-o ../../gen/calculator4
. - Pass just
Calculator.g4
as the final argument to the command.