On Mon, 15 Feb 2021 at 16:02, Markku Korkeala <markku.korkeala@iki.fi> wrote:
>     $ javac -classpath /usr/share/java/antlr4-runtime.jar  Hello*.java         
>     HelloBaseListener.java:3: error: package org.antlr.v4.runtime does not exist
>     import org.antlr.v4.runtime.ParserRuleContext;
>                               ^
>    HelloBaseListener.java:4: error: package org.antlr.v4.runtime.tree does not exist
>    import org.antlr.v4.runtime.tree.ErrorNode;

It works on my Fedora 33. I think you might have some errors in
the classpath, I used the following command:

$ javac -cp

Thanks! Indeed I had missing `antlr4` dir in my classpath.

$  hello javac -cp /usr/share/java/antlr4/antlr4-runtime.jar Hello*.java  
$  hello javac -cp /usr/share/java/antlr4-runtime.jar  Hello*.java 
$ java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment 18.9 (build 11.0.10+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.10+9, mixed mode, sharing)

Same here.

Why is this .jar not added to classpath automatically during installation of `antlr4-runtime`?