Re: OpenJDK 11 doesn't read ANTLR v4 runtime .jar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Mon, 15 Feb 2021 at 16:02, Markku Korkeala <markku.korkeala@xxxxxx> wrote:
>     $ javac -classpath /usr/share/java/antlr4-runtime.jar  Hello*.java         
> error: package org.antlr.v4.runtime does not exist
>     import org.antlr.v4.runtime.ParserRuleContext;
>                               ^
> 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`?
java-devel mailing list -- java-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to java-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct:
List Guidelines:
List Archives:
Do not reply to spam on the list, report it:

[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux