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         
>     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
.:/usr/share/java/antlr4/antlr4.jar:/usr/share/java/antlr4/antlr4-runtime.jar:$CLASSPATH
Hello*.java

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: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/java-devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

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

  Powered by Linux