Home > Net >  antlr alias not working in other directories
antlr alias not working in other directories

Time:02-10

I am trying to get started with antlr4.
I followed the installation tutorial from their website step by step including writing the following command:

alias antlr4='java -Xmx500M -cp "/usr/local/lib/antlr-4.9.2-complete.jar:$CLASSPATH" org.antlr.v4.Tool'

I created two Hello.g4 files, one in usr/local/lib and one in my Desktop. When I run

antlr4 Hello.g4 

in lib, it works just fine. However, when I run it in the Desktop, I get

antlr4: command not found

CodePudding user response:

The alias is valid only in the current session. You may need to write the first command to ~/.bashrc (depending on your system).

  •  Tags:  
  • Related